Mod_reWrite and the www issue
-
I was given a Mod_reWrite code to solve the www verses the non-www issue but have no idea how to merge it with the default .htaccess file.
The WordPress default is:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>While the concatination script is:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST}!^www\.mydomain\.com[NC]
RewriteRule ^(.*)$https://www.mydomain.com/$1[L,R=301]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\/(([^/]+/)*)index\.php\
HTTP/ RewriteRule index\.php$ https://www.mydomain.com/%1 [R=301,L]
</IfModule>Having changed the ‘mydomain’ bit all I keep getting is a 500 Server error.
Any suggestings will only prove that WordPress is the very best (which we all know).
Kind regards. David
- The topic ‘Mod_reWrite and the www issue’ is closed to new replies.