• Hi!
    My permalinks setting was set on Post Name and everything was OK.
    For some tests, i had to change it to Default but then i change it back to Post Name.
    Now, i don’t know why but all my pages (except home) are displaying index.php instead of their own templates.
    When i change back the permalinks settings to default, it works again.
    WTF? I need to use the Post Name setting…
    Thanks.

Viewing 15 replies - 1 through 15 (of 17 total)
  • Moderator t-p

    (@t-p)

    When i change back the permalinks settings to default, it works again.

    If that works, then try reading Using_Permalinks before setting a custom permalink structure again.

    Thread Starter Goawn

    (@goawn)

    I’ve already read it but i’m still lost.
    In fact my permalinks are all going to 404.php instead of their own template.
    Mod_rewrite is enabled and my htaccess is writtable. When i change and save the settings, i can see in filezilla that the last modif date of my .htaccess is updated BUT this file still remain the same :

    SetEnv PHP_VER 5_4
    # BEGIN WordPress

    # END WordPress

    Normal? Any idea?

    Moderator t-p

    (@t-p)

    – Try re-saving your permalink structure at Admin panel>>>Settings>>>Permalinks.
    – WordPress either creates/amends the .htaccess file for you or provides you with the correct block of code to manually add to your .htaccess file.

    – My suggestion is add it manually.

    See an example in the link I includedabove how a blockof code should like: http://codex.wordpress.org/Using_Permalinks

    Thread Starter Goawn

    (@goawn)

    Thanks for the replies!
    I tried to resave the permalink structure and i tried to add manually these lines in my htaccess :

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    But it doesn’t work..

    Moderator t-p

    (@t-p)

    Is that pasted block of code generated by the wordpress in your admin?

    That looks perfect if the site is in Root folder.

    Thread Starter Goawn

    (@goawn)

    Nope i added it manually via filezilla.. WordPress doesn’t edit this file automatically.
    How could i fine this block in my admin?

    Thread Starter Goawn

    (@goawn)

    @radices nope the site is not in root folder, it’s in a folder called oti.
    How should i modify my htaccess?

    Moderator t-p

    (@t-p)

    No. My question was from where did you get that block of code?
    Is youe WP in the root folder?

    If you think that code is correct, but you still having the issue:

    try reviewing this: How to fix 404 error when using Pretty Permalinks?

    What do you have set in the Genaral settings? The First URL should have the /oti part on the end.

    Here’s the difference in the htaccess

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /ggg/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /ggg/index.php [L]
    </IfModule>
    
    # END WordPress

    You can see the Base and rewrite rule show the subfolder. I think if the General Settings are set properly WP should generate the correct htaccess code. Let us know.

    Moderator t-p

    (@t-p)

    No. My question was from where did you get that block of code?

    Then that block of code is not the right one for your installation.

    That was my reason for asking you where did you get that code from? Because I was not sure if you copied and pasted the right code or not.

    Any how, try this code assuming your WP is in the folder called “oti”:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /oti/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /oti/index.php [L]
    </IfModule>
    # END WordPress
    Thread Starter Goawn

    (@goawn)

    @tara My WP isn’t in my Root but in a folder called oti which is in the root.
    I can’t try this cause i’m on a shared host and don’t have access to apache configs.. But the host says on his website that mod_rewrite is enabled for all the shared hosts.

    @radices In my general settings i set : http://www.mydomain.com/oti
    But the code isn’t generated.
    I also tried to add your code manually -> no results

    Something weird happened :
    I deleted my htaccess then i went to permalinks settings and save the configs. The htaccess automatically re-appeared but its content is the same than before the removal no matter what i put inside it. (i tested several times with differents contents).

    Thread Starter Goawn

    (@goawn)

    @tara i tried and it doesn’t work..

    Moderator t-p

    (@t-p)

    My suggestion is to contact your hosting provider. There may be something at there end that’s caousing this trouble. Because, this not a WP core issue.

    – you sais mod_rewrite is enabled on your server, and also make sure they have AllowOverride All on that directory in your web server’s config.

    – also try reviewing this: How to fix 404 error when using Pretty Permalinks?

    Thread Starter Goawn

    (@goawn)

    Ok i’ll contact my host provider but i think this is my bad.
    The weird thing is that everything with the permalinks was ok two days ago. They were set on post name and no 404 error..
    I’m currently developing this website, creating a custom theme and I’ve certainly done something wrong but i really don’t know what.
    In any case thank for your time. I’ll keep searching!

Viewing 15 replies - 1 through 15 (of 17 total)

The topic ‘Permalinks problems’ is closed to new replies.