Announcement

Collapse
No announcement yet.

Upper and lower case URLs

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Upper and lower case URLs

    Not realy an Actinic question but does effect an Actinic site I'm working on and I'm sure one of the resident genious's will know.

    I have keycodes set up in actinic and have prepared bounce pages such as:

    www.jean-patrique.co.uk/ESA062

    The bounce page contains a referer script which auto enters the keycode and takes you to a landing page where an offer exists.

    Problem is where people mis-type the url by putting the code part in lowercase:

    www.jean-patrique.co.uk/esa062

    I know this is a server issue. I have tried to get mod_spelling to work in apache but this does not seen to work with our providers (FASTHOSTS).

    Anyone got a alternative?
    Steve D
    Boomedia Ltd
    ______________________________________________________________
    www.jean-patrique.co.uk
    www.smartbeautyshop.com
    www.bunnybusiness.net
    www.ukpets247.co.uk

    #2
    Assuming you're using a .htaccess file to do the redirect then it might be possible to make it recognise upper and lower case urls as being the same. Not sure though.

    The way I would do it is to create a simple keycode page and then use php / asp to check the code and jump to the right page. You can still send out links directly to the page, it's only when a customer has to enter the code that you process the entry to amke sure everything is in upper case. Can be done in javascript too if you want.

    Mike
    -----------------------------------------

    First Tackle - Fly Fishing and Game Angling

    -----------------------------------------

    Comment


      #3
      I am actually using a html page with a meta redirect as I have zero knowledge of PHP etc.
      Steve D
      Boomedia Ltd
      ______________________________________________________________
      www.jean-patrique.co.uk
      www.smartbeautyshop.com
      www.bunnybusiness.net
      www.ukpets247.co.uk

      Comment


        #4
        Are you hosting on a unix or windows server?

        Mike
        -----------------------------------------

        First Tackle - Fly Fishing and Game Angling

        -----------------------------------------

        Comment


          #5
          It's a Fasthosts dedicated Linux server
          Steve D
          Boomedia Ltd
          ______________________________________________________________
          www.jean-patrique.co.uk
          www.smartbeautyshop.com
          www.bunnybusiness.net
          www.ukpets247.co.uk

          Comment


            #6
            Here's some code that should do this for you:

            1. Use this code on a page (or cut and paste the html into your own page). This just allows the visitor to enter the keycode and then calls the php script.

            <html>
            <head>
            </head>
            <body>
            </form>
            <FORM METHOD=POST ACTION="switcher.php">
            <table border=0 cellspacing=0 cellpadding=2>
            <TR>
            <TD colspan=2>Enter Keycode here:<br></TD>
            </TR>
            <TR>
            <TD>KeyCode&nbsp;&nbsp;&nbsp;<INPUT type="text" name="KeyCode" size=30 value="">&nbsp;&nbsp;<INPUT type=submit value="Enter"></TD>
            </TR>
            <table>
            </form>
            <form>
            </body>
            </html>
            2. Change the Keycodes and page destinations on this script to suit and then upload to your website as switcher.php .

            # Enter the default/error page here

            $DefaultPage="http://www.yourdomain.com/somepage.html";

            # This line prevents values being entered in a URL:

            if ($HTTP_SERVER_VARS['REQUEST_METHOD'] != "POST")
            {
            echo "<META http-equiv='refresh' content='0;URL=$DefaultPage'>";
            exit;
            }

            # Import the variable
            $KeyCode = stripslashes($HTTP_POST_VARS['KeyCode']);
            # trim it
            $KeyCode = trim ($KeyCode);
            # Make upper case
            $KeyCode = strtoupper($KeyCode);

            # This decides where to send the page to. Enter as many cases as you want.

            switch ($KeyCode)
            {
            case "ABC1" :
            $Goto = "http://www.yourdomain.com/page1.html";
            break;
            case "ABC2" :
            $Goto = "http://www.yourdomain.com/page2.html";
            break;
            case "ABC3" :
            $Goto = "http://www.yourdomain.com/page3.html";
            break;
            default :
            $Goto = $DefaultPage;
            break;
            }

            # jump to the destination page

            echo "<META http-equiv='refresh' content='0;URL=$Goto'>";
            ?>
            </body>
            </html>
            I did test this and it sems to work Ok for me. This assumes of course that you can run php on your server.

            Mike
            -----------------------------------------

            First Tackle - Fly Fishing and Game Angling

            -----------------------------------------

            Comment

            Working...
            X