rewrite help please

Discussion in 'Apache' started by bentong, Nov 24, 2005.

  1. #1
    I couldn't figure out this problem. :confused:

    I got this rule correct:
    domain.com/folder/search/what/ever.html

    but when I clicked on the above link it will change to this one:

    domain.com/folder/search/what/search/what/ever.html

    any ideas?
     
    bentong, Nov 24, 2005 IP
  2. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #2
    Options +Indexes
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^folder/search/([0-9]+)/([0-9]+)\.html$ search.php?c=$1&s=$2 [L]

    for

    domain.com/folder/search/what/ever.html

    or

    RewriteRule ^folder/search/([0-9]+)/([0-9]+)\.html$ folder/search/search.php?c=$1&s=$2 [L]

    if the script is in that directory.

    RewriteRule ^([0-9]+)/([0-9]+)\.html$ search.php?c=$1&s=$2 [L]

    for

    domain.com/what/ever.html
     
    Nintendo, Nov 24, 2005 IP
  3. johnt

    johnt Peon

    Messages:
    178
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #3
    What other RewriteRules do you have set up ? I don't see any way that the Rule you posted above can change the URL visible in the address bar ( i.e. do a redirect ).
     
    johnt, Nov 24, 2005 IP
    bentong likes this.
  4. bentong

    bentong Banned

    Messages:
    3,543
    Likes Received:
    257
    Best Answers:
    0
    Trophy Points:
    0
    #4
    thanks for the help. it is only a path problem. :(
     
    bentong, Nov 25, 2005 IP