Damn people, href="members" is a FILE. href="/members/" is a directory

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • raymor
    Confirmed User
    • Oct 2002
    • 3745

    #1

    Damn people, href="members" is a FILE. href="/members/" is a directory

    Well I'm currently doing a search and replace
    on the 3rd site today, fixing thousands
    of html pages where the webmaster didn't
    know how to come up with a correct URL.
    So in case anyone reading this doesn't know,
    you'll know now. A link like this tries to find
    a FILE called "members":
    a href="members"
    If you want the index page of a directory called "members/" you need the traling slash:
    a href="members/"

    Many servers are configured to catch this mistake
    and redirect the user back to members/ instead.
    In the best case, that means that it generates twice as many hits every time someone loads that page. First they ask for members, then the
    server tells them to head over to http://yousite.com/members/
    instead, then the browser sends another
    request for members/.
    In the worst case, it can fuck up a lot of shit.
    For example that redirect won't work properly
    with most of your anti-hotlinking code
    or AVS site .htaccess.
    So if you didn't know before, now you know if
    you're linking to a directory (to get it's index page)
    you must end the URL with a slash (/).
    For historical display only. This information is not current:
    support@bettercgi.com ICQ 7208627
    Strongbox - The next generation in site security
    Throttlebox - The next generation in bandwidth control
    Clonebox - Backup and disaster recovery on steroids
  • Xplicit
    Confirmed User
    • May 2003
    • 3558

    #2
    Ok

    Comment

    • bringer
      i have man boobies
      • Jul 2003
      • 13082

      #3
      blah blah blah
      333-765-551

      Comment

      • colpanic
        Confirmed User
        • May 2004
        • 1007

        #4
        Well, members could be a cgi script with / as pathinfo.

        But I'm just being a pain in the ass, you are 99% right

        I like ducks.

        Comment

        • emthree
          Dialer Kingpin
          • Jun 2003
          • 10816

          #5
          What are you using to mass replace?
          I have some shit I need to edit too. I'm thinking of purchasing MTR(Mass Text Replacer)

          Sell Patches & Pills

          Comment

          • kaktuz
            Confirmed User
            • Sep 2004
            • 2422

            #6
            how bout text editor?
            or its a tgext to replace mass PAGES?
            EMAIL: admin [AT] kaktuz.com
            Need Loads of Traffic? Lets Make Business Today!

            Comment

            • raymor
              Confirmed User
              • Oct 2002
              • 3745

              #7
              Originally posted by emthree
              What are you using to mass replace?
              I have some shit I need to edit too. I'm thinking of purchasing MTR(Mass Text Replacer)
              As a Linux geek, I use:

              find members/ -name '*.html' -print -exec perl -i.bak -p -e "s@members"@members/"@ig" {} \;
              Adjusted of course for whatever site I'm working on.
              For historical display only. This information is not current:
              support@bettercgi.com ICQ 7208627
              Strongbox - The next generation in site security
              Throttlebox - The next generation in bandwidth control
              Clonebox - Backup and disaster recovery on steroids

              Comment

              • Radiate
                Confirmed User
                • Dec 2004
                • 1454

                #8
                tis good info many peeps don't know this

                icq 199437756 - contact me if you need a solid hosting solution

                Comment

                • emthree
                  Dialer Kingpin
                  • Jun 2003
                  • 10816

                  #9
                  Originally posted by raymor
                  As a Linux geek, I use:

                  find members/ -name '*.html' -print -exec perl -i.bak -p -e "s@members"@members/"@ig" {} \;
                  Adjusted of course for whatever site I'm working on.

                  Sell Patches & Pills

                  Comment

                  • emthree
                    Dialer Kingpin
                    • Jun 2003
                    • 10816

                    #10
                    Originally posted by kaktuz
                    how bout text editor?
                    or its a tgext to replace mass PAGES?
                    Well, when replacing multiple files most text editors cannot do the trick.
                    MTR is golden when it comes to replacing multiple lines, across multiple files on Windows. The only downside is the company seems to be undermanaged.

                    Sell Patches & Pills

                    Comment

                    • Luc
                      Confirmed User
                      • Nov 2002
                      • 1130

                      #11
                      what is a file?
                      » Looking for Type-in domais? Page Rank domains? Alexa domains? Popular domains?
                      » Domain Research Tool can scan hundreds of thousands of domains to find whatever you're looking for.
                      » Auto-appraise domains and send automated domain offers in bulk with just one click.
                      » Full support for Proxy Servers and International Overture. Try it Free.

                      Comment

                      Working...