FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


User Agent Redirection





CtrlAltDeleteDie
Is user agent redirection possible with DirectAdmin or cPanel, and if you don't use either of those how do you do it?
Thanks.

edit: I just found this (http://www.4guysfromrolla.com/webtech/121400-1.shtml) website, but I'm not sure how to use asp or whatever.
SpellcasterDX
If it requires you to use asp, then you can't do it. Frihost only supports php, not asp. Frihost uses Linux servers. Not Windows servers.
CtrlAltDeleteDie
Thanks for answering. But is there a way to do it without asp? Through java or html?
Bondings
Well I assume the javascript should also be working.

But I think the best way to do this is with a .htaccess file.

It should be something similar, depending on what you want to do:

Code:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_user_agent} ^Googlebot
RewriteRule ^$ page.php
CtrlAltDeleteDie
OK, so if I want to make a psp formatted page, i would put
Code:

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_user_agent} ^Mozilla/4.0 (PSP (PlayStation Portable); 2.00)
RewriteRule ^$ psppage.html

in my .htaccess file in the cgi-bin folder? Sorry, I really don't know what an .htacces file really does.
Bondings
You need to put it in the same folder as the files, like the public_html directory or another one.

If I'm not mistaken, that code looks if it's a PSP and then internally rewrites the url to psppage.html. The user won't notice the rewrite, but he will see psppage.html if he's on a PSP and the normal page otherwise.
Related topics
Robots.txt
robots.txt
Why use IE?
Google's Secret Revealed
Which Firefox Extentions?
Simulating the back button
Robots.txt.... how important is it?
Hide Part of Your Web Site from Yahoo!
.htaccess problem
Best tools for firefox...
Opera 9.0 Technology Preview 2
Seguridad en mis scripts PHP
shift from Firefox to Opera
ZARABIANIE PRZEZ INTERNET
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.