Redirect all *index.php*, *www*, *slash* to non slash url
-
Hello!
In my .htaccess this code:
1.
# 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
and and at the beginning of the file this code:
2.RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/$ /$1 [L,R] # <- for test, for prod use [L,R=301]
I successfully redirect urls from www to pages without www
I successfully redirect urls from slash to pages without slash
But redirection of pages from index.php occurs first on URLs with a slash, and then on URLs without a slash.How can I fix the last point?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Redirect all *index.php*, *www*, *slash* to non slash url’ is closed to new replies.