Quantcast
Channel: BulletProof Security Forum » All Posts
Viewing all articles
Browse latest Browse all 12461

Reply To: Random General Questions

$
0
0

Hi,
I wondered if you could just confirm, i have another site not a WP site so no BPS on it but i want to redirect www.mysite.co.uk/index.htm to www.mysite.co.uk so losing the index.htm
would i use

# Turn on the URL rewrite engine
RewriteEngine On
RewriteCond %{THE_REQUEST} \s/index\.htm\s [NC]
RewriteRule . / [R=301,L]

I have tried it and it seems to work but just wanted to make sure i was not causing any other issues
Thanks

And to direct all non www. to www. would i add to that

RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
  • This reply was modified 5 hours, 4 minutes ago by Profile photo of Paul Paul.
  • This reply was modified 4 hours, 52 minutes ago by Profile photo of Paul Paul.

Viewing all articles
Browse latest Browse all 12461

Trending Articles