![]() |
![]() |
![]() |
||||
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
Industry Role:
Join Date: Jan 2004
Location: oddfuturewolfgangkillthemall!!!!!!!
Posts: 5,656
|
How do you do this with .htaccess?
Let's say I am receiving traffic from a URL with various ID #'s attached to it:
http://www.referrer.com/?id=101 Andthe traffic is going to: http://www.site.com How do I have the .htaccess grab the ID from the referrer and do a quick redirect or something so that it will send the visitor to this instead: http://www.site.com/?ref_id=101 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Industry Role:
Join Date: May 2005
Location: UK
Posts: 1,201
|
how about a little bit of php, that would be easy and more controllable for v
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Industry Role:
Join Date: Jan 2004
Location: oddfuturewolfgangkillthemall!!!!!!!
Posts: 5,656
|
That's what I'm currently doing, but it likes to take forever to finally get to the page and it's probably hurting my bounce rate. htaccess seems to be a lot faster.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
<&(©¿©)&>
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
|
you are probably doing something wrong, it shouldn't take long time to load at all when done in php....
__________________
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 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: Mar 2003
Posts: 50
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Industry Role:
Join Date: Jan 2004
Location: oddfuturewolfgangkillthemall!!!!!!!
Posts: 5,656
|
Would it slow it down much if I'm doing an htaccess redirect and then another one in PHP? Kinda another reason why I just want to have it all in htaccess. I have htaccess redirecting mysite.com/string to mysite.com/page.php, so that I can change the htaccess at any time and have it redirect many links at once to where ever I want, then mysite.com/page.php grabs the ID query from the referrer and redirects to mysite.com/page.php?ref_id=101
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 | |
<&(©¿©)&>
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
|
Quote:
__________________
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 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
Confirmed User
Join Date: Mar 2003
Posts: 50
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Too lazy to set a custom title
Industry Role:
Join Date: May 2003
Location: icq: 71462500 Skype: Jupzchris
Posts: 27,880
|
wrong thread .. edit.
__________________
[email protected] |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 | |
Confirmed User
Industry Role:
Join Date: Jan 2004
Location: oddfuturewolfgangkillthemall!!!!!!!
Posts: 5,656
|
Quote:
I did manage to get what I need all in 1 with the following: RewriteRule ^string/?_(.*)$ http://www.site.com?id=$1 [QSA] So site.com/string_101 will now goto site.com/?id=101, didn't know I could dynamically add zone ID's in Juicy ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 | |
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 55,233
|
Quote:
Code:
RewriteEngine on Options +FollowSymLinks RewriteCond %{HTTP_REFERER} !^http://(.+\.)?referrer\.com/ [NC] RewriteCond %{QUERY_STRING} ^id=([^&]+)$ RewriteRule ^(.*) http://site.com/?ref_id=%1 [L]
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence. ![]() WP Stuff |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Confirmed User
Join Date: Dec 2009
Posts: 997
|
i use this .htaccess to secure my sites
![]()
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |