jlange — 2012-08-27T15:45:59-04:00 — #1
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!
dan_grossman — 2012-08-27T20:19:35-04:00 — #2
Does /bar/foo.html exist? mod_alias matches on paths, not URLs:
Redirect 301 /foo http://www.example.com/bar/foo.html
dklynn — 2012-08-27T22:22:34-04:00 — #3
jlange — 2012-08-28T08:59:50-04:00 — #4
That worked! Guess I didn't understand mod_alias correctly. Thank you!