Results 1 to 5 of 5

Thread: Shorter URLs in Address Bar

  1. #1
    Join Date
    Jan 2011
    Posts
    3

    Default 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. #2
    Join Date
    Jan 2011
    Posts
    3

    Default 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

  3. #3
    Join Date
    Dec 2004
    Location
    Sydney
    Posts
    4,155

    Default

    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.

  4. #4
    Join Date
    Jan 2011
    Posts
    3

    Default

    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....

  5. #5
    Join Date
    Dec 2004
    Location
    Sydney
    Posts
    4,155

    Default

    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).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •