PDA

View Full Version : .htaccess question


GeorgeTH
2004-11-04, 05:39 PM
...at least I hope it is an .htaccess question:

How can I make sure that all traffic goes to exactly the same URL?

My tgp picxs.com currently gets traffic to/from several options, all displaying the same page:
http://picxs.com/
http://www.picxs.com/
http://www.picxs.com/index.shtml
http://picxs.com/index.shtml

The problem with this is that in many referring stats programs you get also 4 different numbers under 'hits received', one for each of the options.
So how can I make sure that every surfer really loads exactly http://www.picxs.com/index.shtml (even it they typed only http://picxs.com/ into the address bar)?

I have the line
DirectoryIndex index.shtml index.html index.htm in my .htaccess which basically makes certain that every possibility gets to see the same page, but this doesn't mean they have the same URL in their address bar! That's what I want to archive!

I hope I didn't explain this in a too convoluted way - Sorry - didn't know any better - GRIN

DangerDave
2004-11-04, 05:48 PM
George try this...:)

http://httpd.apache.org/docs-2.0/misc/rewriteguide.html#url

DD

GeorgeTH
2004-11-16, 06:32 PM
Sorry, a good week later, after trying to understand the link DD gave me, and asking a friend for help: I'm no step further with this!

When it comes to servers (and Unix) I'm such a |newbie| - hopeless!

venturi
2004-11-17, 08:05 PM
This may not be the optimal solution for you but you could create mirror pages and use the meta refresh tag...

<META name="refresh" content="0,http://www.example.com/somepage.html">

GeorgeTH
2004-11-18, 01:27 AM
Originally posted by venturi
This may not be the optimal solution for you but you could create mirror pages and use the meta refresh tag...

<META name="refresh" content="0,http://www.example.com/somepage.html"> No, No, No!
Meta refreshs get you penalised with search engines...

There is a way with htaccess, the explanation is even in DD's link, just that last time I tried to change mine I messed it up that badly that the server died (loop)...

mist
2004-11-18, 02:22 AM
You could add a bunch of lines to your .htaccess file for every URL you want to redirect,
redirect accessed-file URL-to-go-to

could be,
redirect http://picxs.com/ http://www.picxs.com/index.shtml
redirect http://picxs.com/index.shtml http://www.picxs.com/index.shtml

etc.

Mist

venturi
2004-11-19, 12:27 AM
George, as I clearly said it wasn't likely the optimal solution. I merely expressed it as a possible option.