Sorry if this isn't the correct forum. Please tell me where I should ask this. I'm not even sure if I'm phrasing the question correctly!
In a text document, I want to write "Go to example.com/foo" and when they type "example.com/foo" in to the address bar, I want them to go to "http://www.example.com/bar/foo.html".
I can't figure out how to do that. In.htaccess, I've tried this, but it doesn't work (goes to file not found page):
Redirect 301 http://www.example.com/foo http://www.example.com/bar/foo.html
Anyone have any ideas? Thanks in advance!
Does /bar/foo.html exist? mod_alias matches on paths, not URLs:
Redirect 301 /foo http://www.example.com/bar/foo.html
That worked! Guess I didn't understand mod_alias correctly. Thank you!
This topic is now closed. New replies are no longer allowed.