dbrimlow Posted July 6, 2007 Share Posted July 6, 2007 I renamed @ 2 dozen pages that had used a php extension to use .html (they used to have a php includes for the nav bar). Can I simply place a redirect in my http.conf file (instead of using mod_rewrite)? redirect 301 /oldpage1.php http://www.mysite.com/oldpage1.html redirect 301 /somepage2.php http://www.mysite.com/somepage2.html redirect 301 /anotherpage3.php http://www.mysite.com/anotherpage3.html redirect 301 /thatpage4.php http://www.mysite.com/thatpage4.html etc... or should I do: RewriteEngine On RewriteBase/ RewriteRule ^oldpage1\.php$ oldpage1.html [R=301,L] RewriteEngine On RewriteBase/ RewriteRule ^somepage2\.php$ somepage2.html [R=301,L] etc... Also, does it matter where in the conf file I place it (I assume in the same section as Alias)? DAve Quote Link to comment Share on other sites More sharing options...
hackerkts Posted July 7, 2007 Share Posted July 7, 2007 I prefer using mod_rewrite than redirecting them to other pages, if I didn't forget redirect will give spiders some problems. Your .htaccess, you don't have to repeat putting this RewriteEngine On RewriteBase/ Quote Link to comment Share on other sites More sharing options...
dbrimlow Posted July 7, 2007 Author Share Posted July 7, 2007 Isn't it better to put it directly into the http.conf file? Quote Link to comment Share on other sites More sharing options...
hackerkts Posted July 7, 2007 Share Posted July 7, 2007 I'm not sure which is a better method, but I prefer using mod_rewrite. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.