Greenguy's Board

Greenguy's Board (http://www.greenguysboard.com/board/index.php)
-   Programming & Scripting (http://www.greenguysboard.com/board/forumdisplay.php?f=15)
-   -   .htaccess question (http://www.greenguysboard.com/board/showthread.php?t=12996)

GeorgeTH 2004-11-04 04:39 PM

.htaccess question
 
...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
Quote:

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 04:48 PM

George try this...:)

http://httpd.apache.org/docs-2.0/mis...guide.html#url

DD

GeorgeTH 2004-11-16 05: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 07:05 PM

This may not be the optimal solution for you but you could create mirror pages and use the meta refresh tag...

Code:

http://www.example.com/somepage.html">

GeorgeTH 2004-11-18 12:27 AM

Quote:

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...

Code:

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 01: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-18 11:27 PM

George, as I clearly said it wasn't likely the optimal solution. I merely expressed it as a possible option.


All times are GMT -4. The time now is 09:22 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc