Jump to content

"redirect" instead of "mod_rewrite"?


dbrimlow

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/58735-redirect-instead-of-mod_rewrite/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.