PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Mod Re-write

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

  • Mod Re-write

    I Really need a solution for this.

    http://mybiguglywebsite.com/search.p...=0&zoom_sort=0

    To:

    http://mybiguglywebsite.com/credit+cards
    http://mybiguglywebsite.com/stupid+stuff+here

    Any ideas?

    From Google:
    If you decide to use dynamic pages (i.e., the URL contains a '?' character), be aware that not every search engine spider crawls dynamic pages as well as static pages. It helps to keep the parameters short and the number of them small.

    I know this can be done with a .htaccess file but I dont know how to write one. Would be a GREAT Upgrade feature. Been with Zoom from the beginning and just upgraded. THANKS AGAIN!

  • #2
    The solution is really to use the Mod Re-write module in the Apache web server. You can not get the same effect by using PHP scripting or any other method I know about.

    There is also the problem is that your short URLs don't include enough information for Mod Re-write to work.

    I would think that you would have more chance to make it work with a URL like,
    http://mybiguglywebsite.com/search_php/credit+cards
    At least this way there is something to indicate that a search is being done.

    The next problem is that you have also lost the parameters used for Zoom. For example, zoom_page=10 forces Zoom to display the 10th page of results. Zoom will produce results without most of it parameters.
    So you could use,
    http://mybiguglywebsite.com/search.p...y=credit+cards
    but the results page is not going to display the same results as the long URL you provided.

    You can find the documentation on the Apache mod_rewrite module here,
    http://httpd.apache.org/docs/mod/mod_rewrite.html

    There is also a tutorial on using it here,
    http://www.yourhtmlsource.com/sitema...rewriting.html

    -----
    David

    Comment


    • #3
      Re: Mod Re-write

      Here's what I used to mod_rewrite file names...
      From URL/{search}.html
      ....to URL//intro/search.cgi?zoom_query={search}

      Code:
      RewriteEngine on
      RewriteCond %{REQUEST_URI}  \.html$
      RewriteRule (.+)\.html$  /intro/search.cgi?zoom_query=$1
      The RewriteCond (rewrite condition) matches filenames ending with .html, and the RewriteRule converts the wildcard filename to that with the script path in place.

      I've found mod-rewrite to be very difficult, but you can see this working at http://www.lobster-magazine.co.uk/ where clickng on the 'Suggested search words' automatically does a Zoom search.

      I run another site without mod_rewrite at http://www.catastrophism.com/intro/ and find that the search engines still pick up on the URLs.

      Regards,
      Ian Tresman

      Comment


      • #4
        Zoom not working on your site

        Bad news...

        I was checking out your site:
        http://www.lobster-magazine.co.uk
        ... and no matter what I ran for a search (including clicking on your suggested words), I see:

        Search results for: missing in all categories

        85 results found.

        9 pages of results.


        Looks like something is broken on your end.

        Just an FYI.



        Charles

        Comment


        • #5
          Re: Zoom not working on your site

          Originally posted by Charles
          I was checking out your site: http://www.lobster-magazine.co.uk
          ... and no matter what I ran for a search (including clicking on your suggested words), I see:
          Search results for: missing in all categories
          85 results found.
          9 pages of results.
          Looks like something is broken on your end.
          I couldn't duplicate this, could I ask you to:

          a. Check whether my site www.catastrophism.com/intro/ has the same problem?

          b. Let me know what Browser and version number you are using.

          c. Let me know what Operating System and version you are using, eg. Windows XP Service Pack 2, Mac OS?

          Regards,
          Ian Tresman

          Comment


          • #6
            iantresman,

            Looked at your sites and the searches were all fine for me.

            I really liked the way you used a static list of key words link to ZoomSearch - a very nice approach.

            Regards,

            Mark
            Mark Gallagher

            Comment


            • #7
              I also just checked the searching @ lobster and it seemed to be working OK.

              -----
              David

              Comment


              • #8
                Re: Zoom not working on your site

                Originally posted by Charles
                I was checking out your site:
                http://www.lobster-magazine.co.uk
                ... and no matter what I ran for a search (including clicking on your suggested words), I see:
                Search results for: missing in all categories
                There is indeed a potential problem. My static page were linking to www.domain-name.com/keyword.html

                The first page of results works fine, but on selecting subsequent pages, the links to the documents did not work because the search engine was creating links with the format www.domain-name.com/documents/files.htm

                They should've been in the format https://www.domain-name.com/zoom-dir...ents/files.htm

                My static page should've been linking to www.domain-name.com/zoom-dir/keyword.html

                I guess I could've gotten around his by putting a copy of Zoom in the root, or modifying mod_rewrite to take this into account, but haven't figured out how to yet!

                Regards,
                Ian Tresman

                Comment

                Working...
                X