PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Shorter URLs in Address Bar

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

  • Shorter URLs in Address Bar

    Hi guys! would like to know if there is a way to make url's shorter in the address bar?

    at the moment when i upload the results to the domain i get the following.

    search.php?zoom_sort=0&zoom_query=KEYWORD+KEYWORD& zoom_per_page=10&zoom_and=0
    But maybe you can help me to make it something like:

    search.php?KEYWORD+KEYWORD

    or

    search.php/CATEGORY/KEYWORD
    Would really appreciate if someone can guide me in the right direction.....

    Thx

  • #2
    Mod Rewrite

    Hi Wrensoft,

    I know i need to use mod_rewrite

    SAMPLE:

    RewriteEngine on
    RewriteRule ^article/([0-9]+)/([0-9]+)/(.*?).html$ /article.php?articleid=$1&categoryid=$2
    If you could give me the correct settings I would really appreciate it!

    Thank you
    J

    Comment


    • #3
      You can shorten it to,
      /search.php?zoom_query=word1+word2
      without needing to get involved with the black arts of Apache mod_rewrite.

      All the missing parameters will just take default values in this case.

      Comment


      • #4
        Thank you for the quick response.

        I guess i need to make this change in the search.php file? Do you have the line number and file to edit? or do i need to change this in the software....

        Comment


        • #5
          Yes, you should be able to customise the search.php file to change the name of the parameters.

          We don't have a list of all the changes required. But it won't be a single line change. Probably a dozen or more changes would be required to change all the parameters.

          Also once you start customising the script, we no longer support it, so make sure you know what you're doing (or have someone who does).

          Comment

          Working...
          X