• Hi there. I have a website which is static and not made in wordpress. It is a set of simple html pages which I like the look of. I have realised it cannot be viewed properly on mobile devices. My plan is to use some kind of mobile detection script written in PHP that operates server side rather than a client side script. That script will redirect mobile users to a responsive wordpress page. I dont want to use a javascript detection method running clientside since this will mistake browsers which run javascript blockers such as noscript, etc, with mobile devices that cannot run javascript. I have full access to the cgi-bin and can add scripts there
    a few questions arise:
    supposing I use script that can be generated here what exactly do I do with the script? I put that in the cgi-bin, but then in my webpage how do I make use of that?

    Is there a better method, perhaps doing it the other way around where the wordpress site is the root site and detects desktops and laptops and redirects those to the static pages?

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    IMO, if your server is running Apache (most are it seems), using the Apache script in a .htaccess file is the best approach. As with most of the offered scripts, the location or RewriteRule line will need to be revised for your specific situation.

    The main issue I see with your approach is how you plan to deal with various direct links and possibly skip links to all the various parts of your current site. Will this structure be mirrored in WP? While possible, WP has it’s own way of doing things which is better to not fight against if you can. I don’t need an answer, just something to consider, or perhaps you have already.

    You don’t want to identify desk and lap top browsers, who’s going to figure out how to do that? Although as mobile browsers proliferate, it may turn out to be easier in the near future. Note that you will need to keep the detection regexp used in the scripts updated occasionally in order to capture the latest ever changing user agent strings.

Viewing 1 replies (of 1 total)
  • The topic ‘serverside script in static page to call a wp theme? Or the other way around?’ is closed to new replies.