Forum Moderators: phranque
So here is my situation: I have completely revamped my site with a completely different directory structure and naming convention. I would like my old pages to be redirected to my new pages. I have figured out how to do that. Whether it is by the book or not I don't know but it works.
Now what is the purpose Mod Rewrite? When the rewrite is done correctly is it solely for telling the server the new name of the file?
If I am correct so far (hopefully), then do I need to create a separate set of redirects for my new pages?
Some clarity would be greatly appreciated. Thanks in advance for your help. :-)
www.webmasterworld.com/forum92/3465.htm
Mod_Rewrite is a more powerful version of Redirect, which can be used to invoke a Redirect - physically change the location in the browser OR Rewrite - serve information to a location from a different location.
In your case you will be redirecting. While you will be able to use Redirect (Mod_Alias) to accomplish your goals, the regular expressions available in Mod_Rewrite should prove beneficial if there is any consistency to your naming structure.
Justin
Thank-you for the reply. Things are a little clearer. Here is the situation I am looking at as well. My error log is 23.3M and growing just for the month of July. I have thousands of "file not found" errors. Which is true, because I renamed every file.
I am basing this next statement on your reply. I would not need a mod rewrite, correct? I would simply need to do a redirect. If I do the redirect will it clear up those "file not found" errors?
Here is what I have done for one redirect:
Redirect /olddirectory/oldpagename.htm [sitename.com...]
I was waiting for a reply before proceeding to far. Is this ok?
Once again thanks Justin :-)
Jim
The only adjustment I see is to define the redirect as permanent (the default is 302, or 'temporary'):
RedirectPermanent /olddirectory/oldpagename.htm http://www.sitename.com/new-page-name.htm
Redirect 301 /olddirectory/oldpagename.htm http://www.sitename.com/new-page-name.htm
Hope this helps.
Justin