Title: Permalinks problems
Last modified: August 22, 2016

---

# Permalinks problems

 *  [Goawn](https://wordpress.org/support/users/goawn/)
 * (@goawn)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/permalinks-problems-11/)
 * 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)

1 [2](https://wordpress.org/support/topic/permalinks-problems-11/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/permalinks-problems-11/page/2/?output_format=md)

 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/permalinks-problems-11/#post-5574136)
 * > When i change back the permalinks settings to default, it works again.
 * If that works, then try reading [Using_Permalinks ](http://codex.wordpress.org/Using_Permalinks)
   before setting a custom permalink structure again.
 *  Thread Starter [Goawn](https://wordpress.org/support/users/goawn/)
 * (@goawn)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/permalinks-problems-11/#post-5574215)
 * 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](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/permalinks-problems-11/#post-5574226)
 * – 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](http://codex.wordpress.org/Using_Permalinks)
 *  Thread Starter [Goawn](https://wordpress.org/support/users/goawn/)
 * (@goawn)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/permalinks-problems-11/#post-5574230)
 * 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](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/permalinks-problems-11/#post-5574232)
 * Is that pasted block of code generated by the wordpress in your admin?
 *  [Radices](https://wordpress.org/support/users/radices/)
 * (@radices)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/permalinks-problems-11/#post-5574233)
 * That looks perfect if the site is in Root folder.
 *  Thread Starter [Goawn](https://wordpress.org/support/users/goawn/)
 * (@goawn)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/permalinks-problems-11/#post-5574236)
 * 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](https://wordpress.org/support/users/goawn/)
 * (@goawn)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/permalinks-problems-11/#post-5574237)
 * [@radices](https://wordpress.org/support/users/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](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/permalinks-problems-11/#post-5574238)
 * 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?](http://codex.wordpress.org/FAQ_Troubleshooting#How_to_fix_404_error_when_using_Pretty_Permalinks.3F)
 *  [Radices](https://wordpress.org/support/users/radices/)
 * (@radices)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/permalinks-problems-11/#post-5574239)
 * 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](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/permalinks-problems-11/#post-5574240)
 * > 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](https://wordpress.org/support/users/goawn/)
 * (@goawn)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/permalinks-problems-11/#post-5574242)
 * [@tara](https://wordpress.org/support/users/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](https://wordpress.org/support/users/radices/) In my general settings
   i set : [http://www.mydomain.com/oti](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](https://wordpress.org/support/users/goawn/)
 * (@goawn)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/permalinks-problems-11/#post-5574243)
 * [@tara](https://wordpress.org/support/users/tara/) i tried and it doesn’t work..
 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/permalinks-problems-11/#post-5574244)
 * 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](https://wordpress.org/support/users/goawn/)
 * (@goawn)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/permalinks-problems-11/#post-5574247)
 * 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)

1 [2](https://wordpress.org/support/topic/permalinks-problems-11/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/permalinks-problems-11/page/2/?output_format=md)

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

## Tags

 * [permalinks](https://wordpress.org/support/topic-tag/permalinks/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 17 replies
 * 3 participants
 * Last reply from: [Goawn](https://wordpress.org/support/users/goawn/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/permalinks-problems-11/page/2/#post-5574252)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
