Link to home
Start Free TrialLog in
Avatar of awarraic
awarraicFlag for United States of America

asked on

Redirecting a URL

Server info:
Sun Solaris 10

Hi, I had a directory name change on my server, let's see from a folder name ABC to DEF

I placed a redirect on the server something like:
Redirect FROM(ABC) TO(DEF)

Issue that I am facing is, every sub folder and sub page gets redirect to the DEF folder.
For example,

"http://xxx.com/ABC/hours.html" gets redirect to
"http://xxx.com/DEF/"

Is there any way/syntax to just replace ABC with DEF and the server 'd render the rest of the URL as it is. For example:
"http://xxx.com/ABC/hours.html" redirect to
"http://xxx.com/DEF/hours.html"

It's not just for one page, I am trying to find a way to do that for "ENTIRE" folder so that I don't have to put redirects for each page separately.

Any thoughts? ideas?
ASKER CERTIFIED SOLUTION
Avatar of szlamp
szlamp
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of arober11
Alternatively you could add an Alias to your httpd.conf (see: http://httpd.apache.org/docs/2.2/mod/mod_alias.html) e.g.

Alias /ABC/  /var/web/htdocs/DEF/

Or add a symbolic link in the root directory e.g.

ln -s DEF ABC

Note: Make sure you have a ' FollowSymLinks'  in the respective Directory Options block.