Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Browser UserAgent in Perl Redirect

Status
Not open for further replies.

DonP

IS-IT--Management
Jul 20, 2000
684
US
I have a fairly simple Perl redirect script that takes people to different versions of the site depending on which browser they are using. It uses the browser's UserAgent for the purpose. With it, is there a way to take the UserAgent, rename it to something different (some constant - can be anything) that can then be used in a .htaccess file to restrict access from outside to links directly to subfolders? I don't want a password scheme, just a way to fool the system into thinking the link is coming from a specific place or person.<br><br>DonP
 
I still haven't found a solution if there is one), but I think I may not have expressed what I need because I mixed up some terms.&nbsp;&nbsp;I think what I need is for a way for the redirect script to change the Referrer, not the UserAgent, even though it is the UserAgent that determins which version of the site to load.&nbsp;&nbsp;I don't care anymore if there is only one version of the site, but I would like the Web server to &quot;think&quot; that anything coming in via the redirect script is the same Referrer (some made-up value that is a constant) ragardless of where the visitor actually is from.&nbsp;&nbsp;That way I can block direct access to the sub directories from anyone not coming in through the front door of the site.<br><br>Any ideas how this might be done are appreciated, whether using this method or another!<br><br>DonP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top