I want to point 2 or more than 2 URLs to point to the same l

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

Post Reply
Papiya Sinha
Forum Newbie
Posts: 2
Joined: Thu Jul 06, 2006 2:41 am

I want to point 2 or more than 2 URLs to point to the same l

Post by Papiya Sinha »

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.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

mod_rewrite for apache. Google it ;)
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Post by matthijs »

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 »

An Alias would suffice already...
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

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 »

Alias?

Does that go in the htaccess as well?
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

matthijs wrote:Alias?

Does that go in the htaccess as well?
Yes
Post Reply