Forum Moderators: phranque

Message Too Old, No Replies

changing address name with alias

         

oopsi8abug

2:17 pm on Jun 6, 2006 (gmt 0)



Hi All,

We've recently revamped one of our websites. In the process we changed a lot of the directory names. We wanted the old links to still work so I added aliases for the old directory names, to point them to the new names.

i.e., for this
old link [ourdomain.com...]
new link [ourdomain.com...]

we added this to the httpd.conf
Alias /subdir/subdir2/ "/path/to/NewandImproved/"

This all works just fine but, since all of the links on the site are relative, the old link name remains in the address bar for the duration of their stay.

I'm wondering if there is a way to change the address that is displayed when they follow those links?

thanks!

jdMorgan

12:55 am on Jun 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Use the Redirect directive of mod_alias [httpd.apache.org], rather than the Alias directive:

Redirect 301 /subdir/subdir2/ http://www.example.com/path/to/NewandImproved/

Jim