URL Rewriting
Moderator: General Moderators
-
rameshmrgn
- Forum Newbie
- Posts: 15
- Joined: Sat Jun 17, 2006 1:01 am
URL Rewriting
hi all,
i am new to URL rewritng.
i would like to rewrite my http://localhost into http://www.test.com.
Is it possible? how to do that?
Thanks & Smiles,
RamE
i am new to URL rewritng.
i would like to rewrite my http://localhost into http://www.test.com.
Is it possible? how to do that?
Thanks & Smiles,
RamE
-
kettle_drum
- DevNet Resident
- Posts: 1150
- Joined: Sun Jul 20, 2003 9:25 pm
- Location: West Yorkshire, England
- itsmani1
- Forum Regular
- Posts: 791
- Joined: Mon Sep 29, 2003 2:26 am
- Location: Islamabad Pakistan
- Contact:
solution is for apache web server where rewriting is enabled.itsmani1 wrote:try :
RewriteEngine on
RewriteRule ^http://localhost$ http://www.test.com
not sure of it.
- aaronhall
- DevNet Resident
- Posts: 1040
- Joined: Tue Aug 13, 2002 5:10 pm
- Location: Back in Phoenix, missing the microbrews
- Contact:
I think what you're trying to do is have http://localhost display in the browser as http://www.test.com. If you're only looking to use a fully qualified domain name on a testing server, http://www.somesite.com is interpreted as http://localhost on most browsers.
- theYinYeti
- Forum Newbie
- Posts: 15
- Joined: Thu Oct 26, 2006 3:33 pm
- Location: France
To my big surprise, this seems to be an OS feature, not a browser feature, at least in Linux:
Thanks for the tip.
Yves.
Code: Select all
[root@sedentaire ~]# host www.somesite.com
www.somesite.com has address 127.0.0.1Yves.
-
kettle_drum
- DevNet Resident
- Posts: 1150
- Joined: Sun Jul 20, 2003 9:25 pm
- Location: West Yorkshire, England
-
nickvd
- DevNet Resident
- Posts: 1027
- Joined: Thu Mar 10, 2005 5:27 pm
- Location: Southern Ontario
- Contact:
Yup...kettle_drum wrote:I think somebody has just bought the domain and set the A record to 127.0.0.1 as its a valid registered domain name.
http://www.dnsstuff.com/tools/lookup.ch ... m&type=ALL
I believe its possible under windows just to edit your hosts file to point what ever domain name you want to localhost, just remember that you won't be able to access that domain on the web once added.
article about host files http://support.microsoft.com/kb/172218
article about host files http://support.microsoft.com/kb/172218
- theYinYeti
- Forum Newbie
- Posts: 15
- Joined: Thu Oct 26, 2006 3:33 pm
- Location: France
-
rameshmrgn
- Forum Newbie
- Posts: 15
- Joined: Sat Jun 17, 2006 1:01 am
Thanks
Thanks to all for ur kind reply