We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7327
    • 195 Posts
    Hi Guys,

    I've been using Template Switcher and adding in a landing page with an auto-forwarder to add ?browser=detect to the homepage. Is there anyway to add this parameter as the starting site page and get rid of the landing page? For example, if you type in http://www.website.com:

    Rather than just going to :
    www.website.com/homepage.html

    It will go to:
    www.website.com/homepage.html?browser=detect

    Help's appreciated smiley Thanks!

    Cheers,
    Les
      • 21257 MODX Staff
      • 730 Posts
      You could accomplish that with a mod_rewrite rule in your .htaccess file.
      http://www.workingwith.me.uk/articles/scripting/mod_rewrite
        Mike Schell
        Lead Developer, MODX Cloud
        Email: [email protected]
        GitHub: https://github.com/netProphET/
        Twitter: @mkschell
        • 7327
        • 195 Posts
        Hey netProphET,

        I'll take a look at this, thanks!
          • 14214
          • 299 Posts
          If you are set on using the parameter in the homepage you can edit the .htaccess file or if using furls you can add the info the alias and edit the core rewrite.

          Alternately
          <!--[if IE 6]>
          <link rel="stylesheet" type="text/css" href="ies-style.css" />
          <![endif]-->

          or
          <link rel="stylesheet" media="screen and (min-device-width: 800px)" href="800.css" />


          Out of curiosity, why are you switching templates?
            • 7327
            • 195 Posts
            I make templates for desktop and mobile versions of the website I'm designing for. Since I primarily don't make fluid site designs, and there's a need to do minor tweaking to the HTML for the mobile version for things like the layout and such, I find that mobile template switcher plugin works for me. I'm using the one with the <standard> and <mobile> tags. I'm still looking into the htaccess file at the moment.

            But that's a good question I should look into as well, right now I find the need to change only a small portion of the HTML for my mobile but I may as well try to reduce the amount of changes to the HTML script to nil while fully relying on CSS for display for mobile or desktop editions of the site.
              • 14214
              • 299 Posts
              I have a few sites where I am making minor changes for mobile browsers and many sites that make exceptions for IE users. I plan on more robust mobile CSS in the near future but I am first looking for better mobile menus for tablets where previously I relied upon roll-over on desktops.

              Another thing I am doing is print CSS that results in more professional prints or PDFs from the website.