Forum Moderators: phranque
I'd have a url: [site.com...] which I'd like to redirect to: [site.com...]
I can't figure out how to get this working... Mainly because I first have to make sure the request is for a user and not for a sub folder (ie: "http://www.site.com/images" versus "http://www.site.com/username").
I have a list of the folders in the directory that I'd like to exclude and no username will ever match any of these folders.
Also, redirection works a little different on a localhost setup versus the production setup:
Any suggestions? I've looked all over and can't find anything that will help me. Thanks in advance!
-Matt
Welcome to WebmasterWorld!
Do you actually want to redirect the user, or do you want to let them think they've got a "special" subdirectory?
If you redirect them, they'll see the php script URL in their browser address bar. If you simply do an internal rewrite to the script with the proper querystring=useranme, they won't know that the rewrite occurred.
Either way, take a look at our forum charter [webmasterworld.com] for some links to get you started.
The test vs. production server domain is irrelevant if you do an internal rewrite, and can be handled by using the %{HTTP_HOST} variable instead of a fixed domain-name string if you really want to do an external redirect.
Jim