PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Papiya Sinha
Forum Newbie
Posts: 2 Joined: Thu Jul 06, 2006 2:41 am
Post
by Papiya Sinha » Mon Jul 17, 2006 5:39 am
I want to point 2 or more than 2 URLs to point to the same location on my server.How can I do that ?
e.g. if I have xyz.com server...
and i want
http://www.xyz.com/AAAA/
and
http://www.xyz.com/BBBB/
to point to the same folder location when anyone acess that through URL..how can I do that ?
Thanks in advance.
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098 Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia
Post
by Chris Corbyn » Mon Jul 17, 2006 6:11 am
mod_rewrite for apache. Google it
matthijs
DevNet Master
Posts: 3360 Joined: Thu Oct 06, 2005 3:57 pm
Post
by matthijs » Mon Jul 17, 2006 6:11 am
You can use mod_rewrite in your htaccess for that (search here or on google for rewriting and clean urls). But be carefull with pointing more then one url to the same content. Search engines might not like that. So make sure you use permanent redirects (302 it is if I'm right).
timvw
DevNet Master
Posts: 4897 Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium
Post
by timvw » Mon Jul 17, 2006 7:31 am
An Alias would suffice already...
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098 Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia
Post
by Chris Corbyn » Mon Jul 17, 2006 8:16 am
timvw wrote: An Alias would suffice already...
Oh yeah. Doh!
Code: Select all
Alias /real/location false/location/
matthijs
DevNet Master
Posts: 3360 Joined: Thu Oct 06, 2005 3:57 pm
Post
by matthijs » Mon Jul 17, 2006 9:14 am
Alias?
Does that go in the htaccess as well?
JayBird
Admin
Posts: 4524 Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:
Post
by JayBird » Mon Jul 17, 2006 9:45 am
matthijs wrote: Alias?
Does that go in the htaccess as well?
Yes