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
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 09-04-2005, 09:09 PM   #1
whoababesnet
Confirmed User
 
Join Date: May 2005
Posts: 201
.htaccess question for redirecting...

Hi,,

hope to get my answer here.


i want to redirected a specific incoming domain by using this code in htaccess:

RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?other-domain.com/.*$ [NC]
RewriteRule .* http://mydomain.com/to-another-page.html [R,L]


the problem is that the .htaccess keep loading this rules and the incoming visitor from other-domain.com never see the page...

if you can help... thank you ..
__________________
ICQ#267-021-715
whoababesnet is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-04-2005, 09:11 PM   #2
pr0
rockin tha trailerpark
 
pr0's Avatar
 
Industry Role:
Join Date: May 2001
Location: ~Coastal~
Posts: 23,088
RewriteEngine on
RewriteCond %{HTTP_HOST} ^fart.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.fart.com$
RewriteRule ^(.*)$ http://www.bukkake.com [R=301,L]
pr0 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-04-2005, 09:12 PM   #3
pr0
rockin tha trailerpark
 
pr0's Avatar
 
Industry Role:
Join Date: May 2001
Location: ~Coastal~
Posts: 23,088
ahhh i didn't read you need to read the referer.....no clue how to do that, be interested to find out though
pr0 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-04-2005, 09:22 PM   #4
whoababesnet
Confirmed User
 
Join Date: May 2005
Posts: 201
yes... the referer domain must be sent to a different page...

the big problem is that the .htaccess file just load&load&load...
__________________
ICQ#267-021-715
whoababesnet is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-04-2005, 09:31 PM   #5
vending_machine
Confirmed User
 
Join Date: Jun 2002
Location: Seattle
Posts: 1,062
Sounds like the referrer still lives after your redirect, so you will need to either restrict your RewriteRule (by using something other than .*) or add another RewriteCond to stop the rewrite when the page it's redirected to is hit.
vending_machine is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-04-2005, 09:34 PM   #6
whoababesnet
Confirmed User
 
Join Date: May 2005
Posts: 201
Yeah..Vending machine...

that's exactly what i would like to do : stoping the rewrite when it's redirected..

but how ?
__________________
ICQ#267-021-715
whoababesnet is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-04-2005, 09:40 PM   #7
vending_machine
Confirmed User
 
Join Date: Jun 2002
Location: Seattle
Posts: 1,062
Try:
Code:
RewriteRule !^/to-another-page.html /to-another-page.html [R,L]
.. or add this before the final rule:
Code:
RewriteCond %{REQUEST_URI} !^/to-another-page.html
vending_machine is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-04-2005, 10:13 PM   #8
whoababesnet
Confirmed User
 
Join Date: May 2005
Posts: 201
i've tried both... but it doesn't work...
__________________
ICQ#267-021-715
whoababesnet 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



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.