Title: Permalinks problem, error 404 (same for MultiSite)
Last modified: August 30, 2016

---

# Permalinks problem, error 404 (same for MultiSite)

 *  [gjudycki](https://wordpress.org/support/users/gjudycki/)
 * (@gjudycki)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/permalinks-problem-error-404-same-for-multisite/)
 * I have problem with error 404 while using permalinks (or MultiSite)
    My hosting
   provider says the mod-rewrite works normally there. My .htaccess file is as follows:
 *     ```
       # BEGIN WordPress
       Options +FollowSymLinks
       RewriteEngine On
       RewriteBase /psychoterapia/
       RewriteRule ^index\.php$ – [L]
       # add a trailing slash to /wp-admin
       RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
       RewriteCond %{REQUEST_FILENAME} -f [OR]
       RewriteCond %{REQUEST_FILENAME} -d
       RewriteRule ^ – [L]
       RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
       RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
       RewriteRule . index.php [L]
       # END WordPress
       ```
   
 * My site is here: [http://fidas.nazwa.pl/psychoterapia](http://fidas.nazwa.pl/psychoterapia)
   
   My example post should be here: [http://fidas.nazwa.pl/psychoterapia/blog/archiwa/62 ](http://fidas.nazwa.pl/psychoterapia/blog/archiwa/62)
   but it returns 404 error
 * If I delete .htaccess file the WordPress is not creating one while changing permalinks
   settings nor displaying any error message like “I can’t create .htaccess…”
 * I have also installed a AskApache Debug plugin which has an option to log errors
   to the log file – but the file is not created at all.
 * Would be grateful for any hint how to find the reason and how to look for it?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [gjudycki](https://wordpress.org/support/users/gjudycki/)
 * (@gjudycki)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/permalinks-problem-error-404-same-for-multisite/#post-6789696)
 * Moreover I checked that my hosting provider does support mode rewrite:
    I created
   a test folder and test file index.php here: [http://fidas.nazwa.pl/testht/index.php](http://fidas.nazwa.pl/testht/index.php)
 * In the folder testht I put the simple .htaccess file like this:
    Options FollowSymLinks
   RewriteEngine On RewriteRule .* index.php
 * and it works, any request like for example this
    [http://fidas.nazwa.pl/testht/blabla](http://fidas.nazwa.pl/testht/blabla)
   is opening my index.php
 *  Thread Starter [gjudycki](https://wordpress.org/support/users/gjudycki/)
 * (@gjudycki)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/permalinks-problem-error-404-same-for-multisite/#post-6789808)
 * Moreover if I undo my changes to .htaccess ant bring it to ths stage:
 *     ```
       # BEGIN WordPress
       <IfModule mod_rewrite.c>
       RewriteEngine On
       RewriteBase /psychoterapia/
       RewriteRule ^index\.php$ - [L]
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteRule . /psychoterapia/index.php [L]
       </IfModule>
       # END WordPress
       ```
   
 * And permalinks work correctly! But MultiSite pages are ugly and in total mess
   and their dasboard is returning error: “Too Many Redirects” here:
    [http://fidas.nazwa.pl/psychoterapia/istdp/wp-admin/](http://fidas.nazwa.pl/psychoterapia/istdp/wp-admin/)(
   where istdp is one of the multisite pages)
 * So now I am going to see what is wrong with .htaccess rules.
 *  Thread Starter [gjudycki](https://wordpress.org/support/users/gjudycki/)
 * (@gjudycki)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/permalinks-problem-error-404-same-for-multisite/#post-6789810)
 * Now I can see some differences in syntax in these respective lines:
 * “Good” lines:
 *     ```
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_FILENAME} !-d
       ```
   
 * “wrong lines”
 *     ```
       RewriteCond %{REQUEST_FILENAME} -f [OR]
       RewriteCond %{REQUEST_FILENAME} -d
       ```
   
 * Good lines were there after I installed WP. Wrong lines appeared when I copied
   the lines prompted by WordPress when starting MultiSite – I was supposed to edit
   my .htaccess and add/replace the suggested lines. However I am not sure if these
   are really the lines prompted by WordPress
 * Apparently there are differences in syntax – no exclmation sign in “wrong” or“
   suspected” lines and additional [OR]
 * I continue my investigation. Any suggestions are welcome.
    Maybe I will study
   how to write commands in .htaccess :-). I wanted to use something plug-and-play:-(,:-),
   without becoming a programmer again, after years.
 *  Thread Starter [gjudycki](https://wordpress.org/support/users/gjudycki/)
 * (@gjudycki)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/permalinks-problem-error-404-same-for-multisite/#post-6789915)
 * Hi,
    I changed may installation of wordpress, now WP files are in /wordpress 
   subfolder bud index.php is in the root folder.
 * I changed some lines in .htaccess and now permalinks AND multisite work correctly.
   
   After reading a little about .htaccess and regular expressions I feel ashamed
   for my previous posts here, so please, don’t learn from them. But still I don’t
   know what was wrong in my .htaccess file and if my current .htaccess file is 
   OK
 * My current, working .htaccess is as follows:
 *     ```
       # BEGIN WordPress
       <IfModule mod_rewrite.c>
       RewriteEngine On
       RewriteBase /
       RewriteRule ^index\.php$ - [L]
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_FILENAME} !-d
   
       # add a trailing slash to /wp-admin
       RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wordpress/wp-admin/ [R=301,L]
       RewriteCond %{REQUEST_FILENAME} -f [OR]
       RewriteCond %{REQUEST_FILENAME} -d
       RewriteRule ^ - [L]
       RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) wordpress/$2 [L]
       RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
       RewriteRule . /index.php [L]
   
       </IfModule>
   
       # END WordPress
       ```
   
 * remarks are welcome

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Permalinks problem, error 404 (same for MultiSite)’ is closed to new 
replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 1 participant
 * Last reply from: [gjudycki](https://wordpress.org/support/users/gjudycki/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/permalinks-problem-error-404-same-for-multisite/#post-6789915)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
