Forum Topic: Redirecting alias urls

Forum: .htaccess Forum : Redirecting • Posted by Jeremy Hogan • Post Date:

I haven’t finished the book, but I looked through the table of contents and didn’t see this. I probably missed it though because the book is exhaustive. (Love it btw)

I have my site at I have an incoming alias from I need to set up a number of permanent redirects for the incoming alias. For example, needs to redirect to the page at, but I want to maintain the alias. After the redirect processes, I want the URL in the browser address bar to say

Can you tell me how to do that or what page of the book covers this specifically? Also, will it work for too? Or do I need to set up another redirect for that? Thanks for the help!

2 Replies to “Redirecting alias urls”

Posted by Jeremy Hogan •

Well, I found the answer to this. Sometimes it hurts to be such a newbie to this stuff. :) For anybody who may stumble on this, the redirect works just the same for the alias and you can use the mod_alias Redirect 301. To keep the alias URL in the browser, I just used the relative path for the URL rather than the absolute path.

Also, to fix my problem entirely, I used the serialized php replacement tool (which is amazing, but use at your own risk) to replace all instances of the subdomain with the alias.

I’m sure there’s still a way to have multiple aliases, if one wanted to and to have those aliases stay masked, but I’m not sure that’s a htaccess thing.

Posted by Jeff Starr

Hi Jeremy, glad you found a solution to this! (and thanks for the follow-up post!)