Forum Moderators: phranque
Now I'm looking to redirect both http://www.example.com/stuff and http://www.example.com/things to http://www.example.com
But of course, I'm having some trouble figuring out how to do this. Any help would be greatly appreciated.
[edited by: jdMorgan at 2:25 pm (utc) on Sep. 29, 2007]
[edit reason] example.com [/edit]
I'm just trying to get requests for www.example.com/things and www.example.com/stuff to redirect to www.example.com
However, I do NOT want www.example.com/stuff/more-stuff.html or www.example.com/things/more-things.html to redirect.
Do you want both non-www and www to redirect, 'cus if you do you need that in this same rule to prevent a redirection chain?
Do you want only /things to redirect, or do you also want /things/ with a trailing "/" to also redirect?
For the first, it sounds like you'll need ^whatever$ to redirect to http://www.example.com/.
If you need the version with trailing / to redirect, then you don't need a separate rule, you can add a question mark to make the final character optional: ^whatever/?$ where the $ sign end-anchors the pattern.
[edited by: g1smd at 11:05 pm (utc) on Sep. 29, 2007]
Yes, I'd want both non-www and www to redirect.
"Do you want only /things to redirect, or do you also want /things/ with a trailing "/" to also redirect?"
Both with and without the trailing slash.