NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page htaccess help

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
5 members in live chat ~  


Reply
 
LinkBack Thread Tools
Old 11-02-2009, 10:48 PM THREAD STARTER               #1 (permalink)
Senior Member
 
newton's Avatar
Join Date: Jun 2006
Location: Everywhere
Posts: 1,432
newton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant future
 


Animal Rescue

htaccess help


Gents

IS this the correct code to put into an htacess file to do a 301 redirect so that all iphone traffic will redirect to url.ext for example and keep the affiliate code?

RewriteCond %{HTTP_USER_AGENT} ^.*iphone.*$ [NC]
RewriteRule ^(.*)$ http:/url.ext/?code=000&code=000 [R=301,L]

?code=000&code=000 is the affiliate code

Thanks in advance
__________________
The speed of light is faster than sound that's why some people appear bright until they open their mouths
Last edited by newton; 11-04-2009 at 02:12 PM.
newton is offline   Reply With Quote
Old 11-03-2009, 10:58 PM THREAD STARTER               #2 (permalink)
Senior Member
 
newton's Avatar
Join Date: Jun 2006
Location: Everywhere
Posts: 1,432
newton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant future
 


Animal Rescue
bump
__________________
The speed of light is faster than sound that's why some people appear bright until they open their mouths
newton is offline   Reply With Quote
Old 11-04-2009, 02:11 PM THREAD STARTER               #3 (permalink)
Senior Member
 
newton's Avatar
Join Date: Jun 2006
Location: Everywhere
Posts: 1,432
newton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant future
 


Animal Rescue
anyone?
__________________
The speed of light is faster than sound that's why some people appear bright until they open their mouths
newton is offline   Reply With Quote
Old 11-04-2009, 02:52 PM   #4 (permalink)
kbm
NamePros Regular
 
kbm's Avatar
Join Date: Sep 2009
Posts: 286
kbm is a jewel in the roughkbm is a jewel in the roughkbm is a jewel in the rough
 



Do you have Cpanel? you can set a re-direct through Cpanel a lot easier.
kbm is offline   Reply With Quote
Old 11-04-2009, 07:18 PM THREAD STARTER               #5 (permalink)
Senior Member
 
newton's Avatar
Join Date: Jun 2006
Location: Everywhere
Posts: 1,432
newton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant future
 


Animal Rescue
Thanks for replying kbm and no I don't on this particular server, so I thought that by editing the htacess there would not be a problem redirecting certain types of traffic to different sites with different affiliate codes. Is this not going to work how I have set it out above?
__________________
The speed of light is faster than sound that's why some people appear bright until they open their mouths
newton is offline   Reply With Quote
Old 11-05-2009, 04:59 AM   #6 (permalink)
Domains my Dominion
 
sdsinc's Avatar
Join Date: Aug 2005
Location: Web 1.0
Posts: 9,963
sdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatness
 


Third World Education Find Marrow Donors! Find Marrow Donors! Find Marrow Donors! Find Marrow Donors! Animal Rescue Animal Cruelty AIDS/HIV Animal Rescue Wildlife Breast Cancer Animal Rescue Wildlife
I have not tested your code but it looks OK at first glance. Did you try it ? If it doesn't work I will test on my server.
__________________
NameNewsletter.com - free lists of available domain names
ZoneFiles.net (beta) - ccTLD and gTLD droplists
sdsinc is offline   Reply With Quote
Old 11-05-2009, 08:29 AM THREAD STARTER               #7 (permalink)
Senior Member
 
newton's Avatar
Join Date: Jun 2006
Location: Everywhere
Posts: 1,432
newton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant future
 


Animal Rescue
Thanks for replying to me sdsinc It seems to work fine on my server and if it is not too much trouble, I would very much appreciate you trying it on yours too please. I just need a double check for my peace of mind. Thanks
__________________
The speed of light is faster than sound that's why some people appear bright until they open their mouths
newton is offline   Reply With Quote
Old 11-05-2009, 01:09 PM   #8 (permalink)
NamePros Regular
 
chadsmith's Avatar
Join Date: Jul 2008
Location: Wichita, KS
Posts: 287
chadsmith is just really nicechadsmith is just really nicechadsmith is just really nicechadsmith is just really nice
 




Worked fine for me. Use

Code:
RewriteCond %{HTTP_USER_AGENT} ip(hone|od) [NC]
RewriteRule ^.* http:/url.ext/?code=000&code=000 [R=301,L]
If you want to redirect ipods too. There are scripts on DetectMobileBrowser.com that can redirect other phones as well.
chadsmith is offline   Reply With Quote
Old 11-05-2009, 06:19 PM THREAD STARTER               #9 (permalink)
Senior Member
 
newton's Avatar
Join Date: Jun 2006
Location: Everywhere
Posts: 1,432
newton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant futurenewton has a brilliant future
 


Animal Rescue
Many thanks chadsmith I bought Andy Moore's script awhile back and am using that also, but I was looking an htacess way of doing this as a standalone too.
__________________
The speed of light is faster than sound that's why some people appear bright until they open their mouths
newton is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


 
All times are GMT -7. The time now is 02:32 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger