View Single Post
Old 10-12-2012, 10:20 PM   PM User | #1
mathceleb
Regular Coder

 
Join Date: Mar 2010
Posts: 235
Thanks: 39
Thanked 6 Times in 6 Posts
mathceleb is an unknown quantity at this point
301 redirect to .html extension

I have 50 files on a website, but only want 3 of them to redirect to .html, so I cannot do a redirect all to .html.

Here is one of them.

test.com/master

I want to redirect that to test.com/master.html

I tried this, but it keeps clocking on the page:

Code:
RewriteRule ^/test http://www.mysite.com/test.html [R=301,L]
I also tried this:

Code:
RewriteRule ^/test$ http://www.mysite.com/test.html [R=301,L]
and this:

Code:
RewriteRule ^/test!\.html$ http://www.teachhub.com/test.html [R=301,L]

Last edited by mathceleb; 10-12-2012 at 10:37 PM..
mathceleb is offline   Reply With Quote