Announcement

Collapse
No announcement yet.

SS000001.pl wandering out of the acatalog directory

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

    SS000001.pl wandering out of the acatalog directory

    I have a site with the following structure

    /
    |-/cgi-bin
    |-/acatalog
    |-/products

    All the navgation links use the search script - i.e. the link is to http://www.domain.co.uk/cgi-bin/ss00...html&NOLOGIN=1

    Some of these links are on pages that reside in the /products directory (a throwback to pre-catalog days). On occasions, if the navigation link is clicked on a page in the /products directory, the search script searches for the section page in the /products directory not the /acatalog directory, e.g. the script tries to find

    http://www.domain.co.uk/products/Section.html

    rather than

    http://www.domain.co.uk/acatalog/Section.html

    Once this happens no matter which directory the script is called from, the script tries to display a page in the products directory.

    Has anyone any idea how to restrict the script to the /acatalog directory?

    TVMIA

    #2
    Without real URL's one can only suggest.

    Why not just fix the links in all the products based pages to be normal href="../acatalog/Section.html" ones.

    The page name is already in the searchscript based URL so each page could have all links fixed by a single regexp based search and replace using a good text editor like Notepad++.

    As it stands, these are effectively hard-coded links and will prevent you ever changing your CGI Script ID number (often a good thing to do to fix script based problems).

    You might even get away with a simple search and replace. E.g. replace all

    www.domain.co.uk/cgi-bin/ss000001.pl?SECTIONID=

    with

    ../acatalog/

    And all

    &NOLOGIN=1

    with null.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Originally posted by NormanRouxel View Post
      Without real URL's one can only suggest.

      Why not just fix the links in all the products based pages to be normal href="../acatalog/Section.html" ones.
      Thanks, Norman. I was hoping to keep the links in both directories in sync automatically.

      I had hoped we could just hardcode the path in the search script, but hey ho!

      Thanks.

      Comment


        #4
        Yes it can be done if you add Referrer on the end of your link. See here and here.
        Peblaco

        Comment


          #5
          Thanks, Louise - that sounds like the sort of solution I was after. I'll give it a whirl. TVM

          Comment

          Working...
          X