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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.