Support » Fixing WordPress » *sighs* Permalinks

  • OK, i could not get permalinks working in WP 2.0. So, i searched and found someone that upgraded to WP 2.01 and then immediately activated permalinks and he got it working (without the /index.php being shown in the browser). So, i upgraded to WP 2.01 and tried permalinks, no workie (/index.php is always shown=works). I use apache2 with php4 and mysql4. I have read conflicting posts where WP 2.0 does not use mod_rewrite? I run tghis linux box myself and have full access to it. I also have a .htaccess file (that is writeable) and adding the *begin wordpress jargon to it does not work. I would like my link format like this: and /faq and so on. The index.php always shows and if i change it to what i want, i get a 404 error. Can anyone help?

Viewing 15 replies - 1 through 15 (of 19 total)
  • First off, I’m sure you have mod_rewrite on. But, you need to scroll down in the httpd.conf and change the AllowOverride option to All. This should work, if not, tell me.

    Same thing happens (index.php shows). I am selecting Numeric
    » in “permalinks”. This also populates “custom” (which is under “numeric”) with the same entry. I also have tried Date and name based
    », same thing happens (index.php shows). Thanks for any help, Direkt
    *EDIT/ Oh, i have also tried “custom” /index.php/archives/%post_id% (both with the /index.php and without /index.php)/*EDIT

    Direkt is probably on the right track. I’d like to suggest you have another go at it: Search through the httpd.conf for AllowOveride and set to ALL – for the proper directory that hosts your blog! If you search the conf, you’ll find AllowOveride in several spots.

    Then restart the httpd service.

    And, for permalinks, do not include “index.php” if doing custom as that would defeat your goal.

    I only find 1 instance of AllowOverride ALL in my httpd file. And it is set to ALL. This file is found in my /etc/apache2 folder. That is what i am trying to do, not include /index.php.

    Few questions:

    you’ve restarted httpd?

    Do you have link to your site?

    What is currently in your .htaccess?

    Yes, restarted a few times.
    When i first started to get permalinks working, nothing was in there but this:
    PHP_FLAG output_buffering On (this is in there so i could use an ajax theme from bloxpress)
    Then, after searching here for permalinks problems, i found others that were saying their htaccess file had this in it:
    #BEGIN WorPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME !-f
    RewriteCond %{REQUEST_FILENAME !-d
    RewriteRule . /index.php
    #END WordPress
    Just for clarification, i entered this into the htaccess file myself. Because i read conflicting posts, here, that WP 2.0 and up did not use mod_rewrite. I also searched my software for “apache” and “mod_rewrite”, not found. I am not sure that mod_rewrite is installed (unless it installs by default with apache2). Thanks again

    … and I’m not bright enough to know if you “need” mod_rewrite for wp2.x, but I’d start by heading back to the httpd.conf and seeing if it is loaded. Look for a line like:
    LoadModule rewrite_module modules/

    As long as there’s not a # in front, it should be loaded. Suppose you could make a little .php page with only phpinfo() in it and check that way too.

    Apache on *nix or windows?

    (this is hard! On my stuff I just jump on the box and start poking around. Trying to do this methodically means I have to think more… hopefully someone bright will show up soon…

    For what it’s worth, I fought this battle a couple months ago, but got it fixed with AllowOverride)

    Nope, it does not look like it is loaded (if needed). Both a search through httpd produced no refeence of mod_rewrite and my phpinfo file also does not produce any reference of mod_rewrite. I am thinking, it DOES need to be loaded to use permalinks. Sorry, it is apache2 on Linux SLES9 (novell distro). Are you running Linux? If so, do you mind telling me how you got mod_rewrite installed. This distro uses a package manager called red carpet, and i can not find any reference of mod_rewrite using red carpet or yast. Where in your httpd file does your mod_rewrite appear? Thanks again for the help, you have answered many questions!
    */EDIT…Yep, it IS installed (by default) and is found in /usr/lib/ But the weird thing is, no reference of it is found in the httpd file. I wonder if i make an entry in the httpd file, will this work?…EDIT*/

    I’m running fedora core 4. Installed and loaded by default. I’d go ahead and add it to your LoadModule section and restart and see what happens.

    Well, i got a little further 🙂 Seems novell has done some modifications to this distro. There isn’t a section in httpd of LoadModule; this section says include /etc.sysconfig.d/LoadModule and this file has the LoadModules inside it. Also this file refers to /etc/sysconfig/apache2 where you also insert the file along with its file path. So now, all entries in the WP admin panel are now missing the /index.php/blah/blah. It simply has /blah/blah, no index.php. And it still does not work and to get it back to working state, i must select the default permalink format. Like i said, got some where but not working with custom permalinks

    OK, here are the weird apache2 files:
    httpd file:
    # generated from APACHE_MODULES in /etc/sysconfig/apache2
    Include /etc/apache2/sysconfig.d/loadmodule.conf

    loadmodule.conf file:
    # as listed in APACHE_MODULES (/etc/sysconfig/apache2)

    LoadModule rewrite_module /usr/lib/apache2-prefork/
    LoadModule suexec_module /usr/lib/apache2-prefork/
    LoadModule access_module /usr/lib/apache2-prefork/
    LoadModule actions_module /usr/lib/apache2-prefork/
    LoadModule alias_module /usr/lib/apache2-prefork/
    LoadModule auth_module /usr/lib/apache2-prefork/
    LoadModule auth_dbm_module /usr/lib/apache2-prefork/
    LoadModule autoindex_module /usr/lib/apache2-prefork/
    LoadModule cgi_module /usr/lib/apache2-prefork/
    LoadModule dir_module /usr/lib/apache2-prefork/
    LoadModule env_module /usr/lib/apache2-prefork/
    LoadModule expires_module /usr/lib/apache2-prefork/
    LoadModule include_module /usr/lib/apache2-prefork/
    LoadModule log_config_module /usr/lib/apache2-prefork/
    LoadModule mime_module /usr/lib/apache2-prefork/
    LoadModule negotiation_module /usr/lib/apache2-prefork/
    LoadModule setenvif_module /usr/lib/apache2-prefork/
    LoadModule userdir_module /usr/lib/apache2-prefork/
    LoadModule ssl_module /usr/lib/apache2-prefork/
    LoadModule php4_module /usr/lib/apache2-prefork/
    LoadModule jk_module /usr/lib/apache2/
    Apache2 file:
    # APACHE_MODULES=”access actions alias asis auth autoindex cgi dir imap include log_config mime negotiation setenvif status userdir”
    # your settings
    APACHE_MODULES=” rewrite suexec access actions alias auth auth_dbm autoindex cgi dir env expires include log_config mime negotiation setenvif userdir ssl php4 jk”

    Can anyone help?

    OK, got mod_rewrite verified as loaded and restarted apache2. Still can not get permalinks working. Now, looking at the htaccess file, it was exactly like this:
    #BEGIN WorPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME !-f
    RewriteCond %{REQUEST_FILENAME !-d
    RewriteRule . /index.php
    #END WordPress
    Now, when updating permalink structure, it looks like this:
    #BEGIN WorPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME !-f
    RewriteCond %{REQUEST_FILENAME !-d
    RewriteRule . /index.php

    #END WordPress
    Notice the white space at the end. So, i know this file is getting written to because of the change. Problem is, i also read here on the forums, that the white space is not good and will cause it not to work. Any ideas?

    Boy…. I’m stumped, personally.

    That space before "#END WordPress" is in my .htaccess as well and doesn’t seem to harm anything.

    I went to have a look at your site, but right now you must have it set to “Default” for permalinks.

    Good to know that someone else has the white space and it works. I do have it set for default now but can set it to the other if you would like to test drive it?
    Edit..Set to numeric for testing. Let me know…Edit

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘*sighs* Permalinks’ is closed to new replies.