Best practice when customer already as a index.php page?

Integrating Tera-WURFL in your applications.

Best practice when customer already as a index.php page?

Postby jhodgski » Tue May 17, 2011 5:30 am

Hiya,

Normally, when installing my Tera-WURFL code on a client's website, I'll create an index.php page that contains the Tera-WURFL detection/redirection code, and then I just edit their .htaccess file to make index.php the default page to be served.

However, what is the best practice if client already has an index.php page? Should I rename their index.php page to something else and name my Tera-WURFL detection/redirection page index.php (and leave .htaccess untouched)? Or should I name my Tera-WURFL detection/redirection page (e.g.) handleRequest.php so I don't need to rename their existing index.php (then update .htaccess to make handleRequest.php the default)?

I'm guessing it's better practice to use the latter solution (as there would be less chance of them accidentally overwriting my Tera-WURFL detection/redirection page)?

Cheers,
James
jhodgski
 
Posts: 20
Joined: Wed Apr 06, 2011 11:42 am

Re: Best practice when customer already as a index.php page?

Postby kamermans » Tue May 17, 2011 8:48 am

Hi James,

I agree that the latter solution would be better so the client doesn't overwrite your changes. Ideally, for a low-medium traffic site, you could use URL Rewriting to send all requests to a handler script that looks at the REQUEST_URI and sends them to either the mobile or desktop version of that page (avoiding infinite redirects with session or cookie vars), but this can be a little cumbersome to program and maintain.
Thanks,

Steve Kamerman
Tera-WURFL Author
COO of ScientiaMobile

IMPORTANT ANNOUNCEMENT! Tera-WURFL and WURFL have joined forces! We have launched ScientiaMobile to provide commercial support for our device detection solutions.

Tera-WURFL.com | Device Explorer
kamermans
Site Admin
 
Posts: 323
Joined: Wed Mar 10, 2010 12:06 pm
Location: Fort Worth, TX

Re: Best practice when customer already as a index.php page?

Postby blizzardofozz » Sat Jul 02, 2011 12:16 pm

Could you please be more specific on how to make the redirection in htaccess file?
My problem is this: I want to use wurlf on a static website.

I installed the tera-wurlf and tested it and works. I made the mobileTest.php file but can you guide me how to test the user agents when they access the website let say through google search and is some SERP not the index page and I want the user to land on the corresponding page on the mobile version.

My main problem is with htaccess i guess - i cannot redirect properly to mobileTest.php.

Could you help me, please?
blizzardofozz
 
Posts: 1
Joined: Sat Jul 02, 2011 12:01 pm


Return to Using Tera-WURFL

Who is online

Users browsing this forum: No registered users and 3 guests

cron