Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

url rewrite question

Status
Not open for further replies.

cdeardor

MIS
Oct 25, 2002
49
US
Hi all. I'm running apache 2.0 on Suse Linux and have a question on rewriting url's. I have a domain, I also own the .org and .net suffixes. All domains share the same ip. The problem is, when someone comes to or .net, it shows up in my logs with whichever suffix they go to. How could I set it up so that when someone goes to or it all ends up (in my logs and in the address bar of the browser) as
 
That looks like exactly what I need. (Looks pretty complex alright.) Thanks for pointing me in the right direction. Good luck with you HP box!
 
Had a look at how I do it and it's much easier than mod_rewrite. You can use Redirect for this. I was getting confused with rewrite, cause that what you asked for and I use it, but somewhere else.

So, in your httpd.conf you want something like this:
<VirtualHost your.ip.goes.here>
ServerName Redirect permanent / </VirtualHost>

<VirtualHost your.ip.goes.here>
ServerName Redirect permanent / </VirtualHost>

<VirtualHost your.ip.goes.here>
ServerName .... all your normal stuff ....
</VirtualHost>

This works 100% for me.
 
Oh great. That seems to work. That was much easier than all of the examples I've seen! You've been a great help. Thank you very much!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top