nathanjosiah
nathanjosiah

Reputation: 4459

symlink or alias? Not sure what its called

I want to redirect request on my local webserver much like "http://localhost/" redirects to my ServerRoot. I have seen it done with "http://www/" and also with "http://helpdesk/" How would I go about adding my own?

Upvotes: 1

Views: 82

Answers (1)

drew010
drew010

Reputation: 69957

Are you saying you want to redirect something like http://custom to your web server? If so you can do this by creating an entry in your hosts file, or configuring your local DNS server to return local addresses for those hostnames.

Add the following to your hosts file (On *nix /etc/hosts and C:\Windows\System32\drivers\etc\hosts on Windows)

127.0.0.1 custom www.custom

Then you can optionally configure a virtual host on your Apache server to handle requests for those hosts. If you don't create a virtual host, it will just serve up the same content as localhost. You can also have your local webserver host the site and add that entry to your local PC's hosts file and be able to browse it from that hostname as well.

If that isn't what you wanted, can you please clarify your question.

Upvotes: 1

Related Questions