Author Topic: Mobile device detection, static pages, and SEO  (Read 542 times)

0 Members and 1 Guest are viewing this topic.

Bocsius

  • is calmer than you are
  • Senior Member
Mobile device detection, static pages, and SEO
« on: March 26, 2009, 11:23:19 AM »
So I've been tasked with creating mobile device detection code. The last hurdle is how to do it on a Linux box.

On the windows side, I have multiple options that all boil down to the same thing. If I'm working on a .NET site, I can put the code in the global.asax file and have it fire off at the beginning of a session. With classic ASP, it's the same thing but in global.asa. With a static site, I can map the .html and .htm extensions to the asp.net or asp DLLs and the previous solutions apply (I've found it's better to use the classic asp DLL in this case).

The question is if I can do the same thing on Linux. (a) Is there a similar global PHP file that can execute code without having to be referenced from every page. (b) Can I map the .html and .htm extensions to whatever process that controls PHP. (c) When in doubt, choose C.

I can't change extensions on these pages because of SEO campaigns, hence the need to map extensions to other processes.