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
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
is opening my index.php
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/
(where istdp is one of the multisite pages)
So now I am going to see what is wrong with .htaccess rules.
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.
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