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.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 12-05-2005, 07:24 AM   #1
xxweekxx
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
xxweekxx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-05-2005, 07:28 AM   #2
woj
<&(©¿©)&>
 
woj's Avatar
 
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
woj is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-05-2005, 07:34 AM   #3
xxweekxx
Confirmed User
 
Join Date: Oct 2002
Posts: 6,780
lol u suck
__________________
_________________
I am the best
xxweekxx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-05-2005, 07:34 AM   #4
ABC-Celebs
Confirmed User
 
Industry Role:
Join Date: Dec 2004
Posts: 285
Redirect index.html http://mysite.com

Index.html should be your default first page.
__________________
Raffaele,
ABC-Celebs.com
ABC-Celebs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-05-2005, 07:38 AM   #5
fetishblog
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!
fetishblog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-05-2005, 07:39 AM   #6
xxweekxx
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
xxweekxx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-05-2005, 07:41 AM   #7
ABC-Celebs
Confirmed User
 
Industry Role:
Join Date: Dec 2004
Posts: 285
Quote:
Originally Posted by xxweekxx
that wont work..

bcuz IM TRYING TO redirect http://www.mysite.com/index.html to
http://mysite.com/index.html


wont work..
Have you tried
Redirect index.html http://mysite.com/index.html ?
__________________
Raffaele,
ABC-Celebs.com
ABC-Celebs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-05-2005, 07:42 AM   #8
xxweekxx
Confirmed User
 
Join Date: Oct 2002
Posts: 6,780
Quote:
Originally Posted by fetishblog
Something like this might work.

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com(/)?.*$ [NC]
RewriteRule .*$ http://yourdomain.com [R,NC]


didnt work
__________________
_________________
I am the best
xxweekxx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-05-2005, 07:43 AM   #9
xxweekxx
Confirmed User
 
Join Date: Oct 2002
Posts: 6,780
Quote:
Originally Posted by ABC-Celebs
Have you tried
Redirect index.html http://mysite.com/index.html ?
didnt work just made it go crazy, dont forget the index.html in www.mysite.com is the same index.html on mysite.com/index.hml

so it just kept refreshing from one to other non stop
__________________
_________________
I am the best
xxweekxx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-05-2005, 07:44 AM   #10
Scotty.T
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.
__________________
.

Last edited by Scotty.T; 12-05-2005 at 07:45 AM..
Scotty.T is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-05-2005, 07:47 AM   #11
Tempest
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..
Tempest is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-05-2005, 07:47 AM   #12
xxweekxx
Confirmed User
 
Join Date: Oct 2002
Posts: 6,780
hmmwont work for me
__________________
_________________
I am the best
xxweekxx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-05-2005, 07:49 AM   #13
mkx
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?
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-05-2005, 07:50 AM   #14
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
oh nevermind, thought it was the other way around
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-05-2005, 07:52 AM   #15
xxweekxx
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
xxweekxx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-05-2005, 07:53 AM   #16
ABC-Celebs
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]
__________________
Raffaele,
ABC-Celebs.com
ABC-Celebs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-05-2005, 07:55 AM   #17
xxweekxx
Confirmed User
 
Join Date: Oct 2002
Posts: 6,780
that worked! thanks man
__________________
_________________
I am the best
xxweekxx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-05-2005, 07:56 AM   #18
ABC-Celebs
Confirmed User
 
Industry Role:
Join Date: Dec 2004
Posts: 285
Quote:
Originally Posted by xxweekxx
that worked! thanks man

np
__________________
Raffaele,
ABC-Celebs.com
ABC-Celebs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.