Announcement

Collapse
No announcement yet.

Accessing the scripts from a non-www account

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

    Accessing the scripts from a non-www account

    Our client has a site (http://www.boutiqueperfumes.co.uk), which works fine. However, should the site be accessed from a non-www address, then the site will return an "access denied" error whenever the a perl script is accessed.

    eg.

    http://boutiqueperfumes.co.uk/acatal...oetz-face.html - click "add to basket".

    Any suggestions as to what is causing the problem and how to fix it?

    #2
    You need to set up automatic translation of non-www addresses to the www equivalent.
    Bill
    www.egyptianwonders.co.uk
    Text directoryWorldwide Actinic(TM) shops
    BC Ness Solutions Support services, custom software
    Registered Microsoft™ Partner (ISV)
    VoIP UK: 0131 208 0605
    Located: Alexandria, EGYPT

    Comment


      #3
      RewriteEngine On
      RewriteCond %{HTTP_HOST} ^website.co.uk
      RewriteRule (.*) http://www.website.co.uk/$1 [R=301,L]

      .htacess file in the root on your website

      D

      Comment


        #4
        Hi Darren, wjcampbe.

        Thanks for your input

        Darren, I have put the code in my .htaccess file, which now looks like this

        --------------------------
        RewriteEngine On
        RewriteCond %{HTTP_HOST} ^boutiqueperfumes.co.uk
        RewriteRule (.*) http://www.boutiqueperfumes.co.uk/$1 [R=301,L]
        ErrorDocument 404 http://www.boutiqueperfumes.co.uk/
        --------------------------

        Unfortunately, whilst the error document command works, the rewrite engine doesn't appear to be working (is it supposed to change the url in the address bar to http://www.boutiqueperfumes.co.uk? Or leave it as it is?)

        Any suggestions?

        Comment


          #5
          ok slight error in the code

          RewriteCond %{HTTP_HOST} ^boutiqueperfumes\.co.uk$ [NC]
          RewriteRule ^(.*)$ http://www.boutiqueperfumes.co.uk.co.uk/$1 [R=301,L]

          sorry about that

          D

          Comment


            #6
            Jees this F******g server is driving me nuts
            im off to do something more productive

            D

            Comment

            Working...
            X