Greenguy's Board

Greenguy's Board (http://www.greenguysboard.com/board/index.php)
-   General Business Knowledge (http://www.greenguysboard.com/board/forumdisplay.php?f=10)
-   -   htaccess question (http://www.greenguysboard.com/board/showthread.php?t=1958)

GeorgeTH 2003-10-29 05:47 PM

htaccess question
 
How can I set my .htaccess (I assume that's where it's done...) so that any call for my site always goes to the same url?

To confusing the way I expressed this? - o.k. - let me explain:

I want all hits to go to www.mysite.com/index.shtml
type-in traffic to http://mysite.com without www.
traffic to http://mysite.com/index.shtml - again without www.

(I have already a line
DirectoryIndex index.shtml index.php index.html index.htm which defines the load order...)

Reason: unified referrer url in stats - currently I'm sending traffic out from all different options like http://www.mysite.com/index.shtml, http://mysite.com, http://mysite.com/, http://mysite.com/index.shtml - which in several counters shows as 3 or 4 different referrers and much less traffic in either option than the combined traffic.

Cheers

dareutwo 2003-10-29 07:29 PM

Evening George -
Look at the top of your browser.
See that button that says "Search"?
Click that and type in "htaccess"
Should find your answer there.
Otherwise Cleo has a fine page from her webmasters page.

Not being synical.. just can't remember the actual URL's of this... it has been covered here before though. :)

DangerDave 2003-10-29 08:03 PM

Still too easy :D

Quote:

RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=permanent,L]
DD

GeorgeTH 2003-10-29 08:55 PM

Quote:

Originally posted by DangerDave
Still too easy :D

Many thanks - still the best board around |peace|

Cleo 2003-10-29 09:06 PM

Be careful using this on a domain with stuff submitted. If you submit your stuff without the www then it will trigger bots to show a redirect.

DangerDave 2003-10-29 09:32 PM

Very true Cleo....

as with most htacc redirection thingies... these are not to be applied without planning and forethought..

DD

GeorgeTH 2003-10-29 09:58 PM

Thanks for the warning!

I wanted to use it for my TGP sites, because only ~50% of the hits arrive at http://www.picxs.com/index.shtml, the remaining 50% are split across 3 other options... Now if somebody submits and uses a counter like Sextracker it might show that I'm sending 600 hits that day, where in fact it could be well over 1,000 once they check further down the list...

Question:
does this help with Google listings, too?

Currently you might find http://picxs.com/ right above http://www.picxs.com/index.shtml in their results - I would think a combined listing might actually boost my position (rather than hurt it).

Cleo 2003-10-29 10:04 PM

Hmmm, I wonder if it will hurt you since the SEs might see it as redirecting.

DangerDave 2003-10-30 12:27 AM

Quote:

does this help with Google listings, too?
Don't know if "help" is the right word.. but yes it can effect your Google listings..

Rule #1 - always use http://www.domain.com/ when linking, when exchanging links etc, and then ALWAYS use it into the future.

Rule#2 - if you use http://domain.com/ then keep using that syntax.. dont mix them up.

The permanent redirect "should" help refine your pages and SE listings, as google will find http://www.domain.com/ each time.

IF it is done as a permanent redirect, it will not be classed as "redirecting" by the SE's and robots.

DD


All times are GMT -4. The time now is 11:38 PM.

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