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 03-07-2011, 04:44 PM   #1
Jakez
Confirmed User
 
Jakez's Avatar
 
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
__________________
[email protected] - jakezdumb - 573689400

Killuminati

Last edited by Jakez; 03-07-2011 at 04:45 PM..
Jakez is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-07-2011, 05:38 PM   #2
livexxx
Confirmed User
 
livexxx's Avatar
 
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
livexxx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-07-2011, 05:46 PM   #3
Jakez
Confirmed User
 
Jakez's Avatar
 
Industry Role:
Join Date: Jan 2004
Location: oddfuturewolfgangkillthemall!!!!!!!
Posts: 5,656
Quote:
Originally Posted by livexxx View Post
how about a little bit of php, that would be easy and more controllable for v
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.
__________________
[email protected] - jakezdumb - 573689400

Killuminati

Last edited by Jakez; 03-07-2011 at 05:49 PM..
Jakez is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-07-2011, 05:58 PM   #4
woj
<&(©¿©)&>
 
woj's Avatar
 
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
woj is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-07-2011, 06:21 PM   #5
takaya
Confirmed User
 
Join Date: Mar 2003
Posts: 50
try this one

RewriteEngine on
RewriteRule ^/?(.*) http://www.site.com/ [R=301,L,QSA]
takaya is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-07-2011, 06:22 PM   #6
Jakez
Confirmed User
 
Jakez's Avatar
 
Industry Role:
Join Date: Jan 2004
Location: oddfuturewolfgangkillthemall!!!!!!!
Posts: 5,656
Quote:
Originally Posted by woj View Post
you are probably doing something wrong, it shouldn't take long time to load at all when done in php....
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
__________________
[email protected] - jakezdumb - 573689400

Killuminati
Jakez is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-07-2011, 06:25 PM   #7
woj
<&(©¿©)&>
 
woj's Avatar
 
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
Quote:
Originally Posted by Jakez View Post
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
need to do it all at once, either all in php, all or all in .htaccess... 2 separate redirects are not a good idea...
__________________
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 03-07-2011, 06:36 PM   #8
takaya
Confirmed User
 
Join Date: Mar 2003
Posts: 50
Quote:
Originally Posted by takaya View Post
try this one

RewriteEngine on
RewriteRule ^/?(.*) http://www.site.com/ [R=301,L,QSA]
This shit will append query string to site.com. It works on my end
takaya is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-07-2011, 06:38 PM   #9
Chris
Too lazy to set a custom title
 
Chris's Avatar
 
Industry Role:
Join Date: May 2003
Location: icq: 71462500 Skype: Jupzchris
Posts: 27,880
wrong thread .. edit.
__________________
[email protected]
Chris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-07-2011, 06:41 PM   #10
Jakez
Confirmed User
 
Jakez's Avatar
 
Industry Role:
Join Date: Jan 2004
Location: oddfuturewolfgangkillthemall!!!!!!!
Posts: 5,656
Quote:
Originally Posted by takaya View Post
This shit will append query string to site.com. It works on my end
I tried but it didn't seem to work. I probably have too much crap going on with this for that to work correctly idk.

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
__________________
[email protected] - jakezdumb - 573689400

Killuminati

Last edited by Jakez; 03-07-2011 at 06:44 PM..
Jakez is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-07-2011, 06:42 PM   #11
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,233
Quote:
Originally Posted by Jakez View Post
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
Code:
RewriteEngine on
Options +FollowSymLinks
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?referrer\.com/ [NC]
RewriteCond %{QUERY_STRING} ^id=([^&]+)$
RewriteRule ^(.*) http://site.com/?ref_id=%1 [L]
this should work.
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-07-2011, 09:13 PM   #12
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,233
tested it on a site, works fine
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-07-2011, 09:21 PM   #13
Dappz
Confirmed User
 
Dappz's Avatar
 
Join Date: Dec 2009
Posts: 997
i use this .htaccess to secure my sites
__________________


Hentai Artist * Draw My Anime *
HentaiLovers * hentaiG4H * ICQ : 657458
Dappz 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.