|
|
|
||||
|
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
Quick .htaccess question.. redirecting people.. help
Hey guys, i would like to redirect everyone that comes to
http://www.mysite.com to http://mysite.com can i do that with .htaccess?
__________________
_________________ I am the best
|
|
|
|
|
|
#2 |
|
<&(©¿©)&>
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
|
yes, I don't feel like writing it up though, heh
maybe someone else will do it, so here is a bump...
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000 Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager ![]() Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager |
|
|
|
|
|
#3 |
|
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
lol u suck
__________________
_________________ I am the best
|
|
|
|
|
|
#4 |
|
Confirmed User
Industry Role:
Join Date: Dec 2004
Posts: 285
|
|
|
|
|
|
|
#5 |
|
Confirmed User
Join Date: Sep 2005
Location: Your mom is my favorite pornstar!#%
Posts: 5,995
|
Something like this might work.
RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com(/)?.*$ [NC] RewriteRule .*$ http://yourdomain.com [R,NC]
__________________
Fling.com doesn't steal your traffic and sales unlike some other dating companies. I promote them, and so should you! |
|
|
|
|
|
#6 |
|
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
that wont work..
bcuz IM TRYING TO redirect http://www.mysite.com/index.html to http://mysite.com/index.html wont work..
__________________
_________________ I am the best
|
|
|
|
|
|
#7 | |
|
Confirmed User
Industry Role:
Join Date: Dec 2004
Posts: 285
|
Quote:
Redirect index.html http://mysite.com/index.html ? |
|
|
|
|
|
|
#8 | |
|
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
Quote:
didnt work
__________________
_________________ I am the best
|
|
|
|
|
|
|
#9 | |
|
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
Quote:
so it just kept refreshing from one to other non stop
__________________
_________________ I am the best
|
|
|
|
|
|
|
#10 |
|
Confirmed User
Join Date: Nov 2004
Location: Scotland
Posts: 1,062
|
RewriteCond %{HTTP_HOST} ^yourdomain.com$
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=301,L] Works for me. Sorry. Just realised it was the other way you want to go. Not sure of the exact syntax for that.
__________________
. |
|
|
|
|
|
#11 |
|
Too lazy to set a custom title
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
|
Usually people want to do it the other way around... Got code to do that, but not what you're asking for..
|
|
|
|
|
|
#12 |
|
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
hmmwont work for me
__________________
_________________ I am the best
|
|
|
|
|
|
#13 |
|
Confirmed User
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
|
i think it is your dns configuration from your domain name registrar. Make sure that * is going to the same as www, hard to explain off hand, what registar are you using?
|
|
|
|
|
|
#14 |
|
Confirmed User
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
|
oh nevermind, thought it was the other way around
|
|
|
|
|
|
#15 |
|
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
yea,
what im trying to do is foward everyone that hits http://www.mysite.com to http://mysite.com wow nobody knows this on gfy?
__________________
_________________ I am the best
|
|
|
|
|
|
#16 |
|
Confirmed User
Industry Role:
Join Date: Dec 2004
Posts: 285
|
mmm...so strange!
Try RewriteEngine on RewriteCond %{HTTP_HOST} ^www.mydomain.com [NC] RewriteRule ^(.*)$ http://mydomain.com/$1 [L,R=301] |
|
|
|
|
|
#17 |
|
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
that worked! thanks man
__________________
_________________ I am the best
|
|
|
|
|
|
#18 | |
|
Confirmed User
Industry Role:
Join Date: Dec 2004
Posts: 285
|
Quote:
np |
|
|
|
|