I recently joined a site called DNSDynamic and was wondering if there was a way to make the URL that they supply redirect to a specific directory on my server since I am hosting multiple sites on multiple directories, but it simply asks for the server IP address and sends visitors to the root.
I figured I’d have to write a bit of code myself for this, what would you recommend?
I was thinking a bit of PHP in the root of the server that detects the referrer and redirects them accordingly using a meta code, am I right?
How would I go about this? Thanks. 🙂
With IIS you can certainly redirect to a subfolder based on the URL used using URL rewrite, I believe that there is similar functionality available in Apache.
URL Rewrite example: