Forum Moderators: phranque

Message Too Old, No Replies

Identify multiple URLs on your website.

How to trace multiple URLs for your pages.

         

sandyk20

2:56 am on Jun 17, 2006 (gmt 0)



Is there a way to trace, what multiple URLs your website must be accessible via?

for example a site with a subdomain can be accessed from following pages:

1.
www.mydomain.com/subdomain/somepage.html
2.
subdomain.mydomain.com/somepage.html
3.
www.subdomain.mydomain.com/somepage.html
4.
***.***.***.***/subdomain/somepage.html (*** = ip adress of hosted site)
5.
mydomain.com/subdomain/somepage.html

Is there a proper way to avoid the same?
Is there a proper way to check/confirm if pages are available only via 1 URL and not all of above?

thanks.

vincevincevince

3:15 am on Jun 17, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The best way to do it, in my opinion, is using .htaccess.

You can check that the HTTP_HOST matches what you expect, and if it wrong, redirect the user. You will still be accessible using all these incorrect methods - but the visitor to that address will just get redirected to the right address.

I have also solved the same problem using PHP before with great success. Be aware with PHP you need to place your domain/host/path checking code at the top of every page (!)

sandyk20

11:05 pm on Jun 17, 2006 (gmt 0)



Hello all,
I take the time to thanks to vincevincevince who helped me resolve all my problems via PM amd IMs

Regards,