Htaccess coding problems " can you spot the problem?"

Discussion in 'Apache' started by mr_bill, Jul 19, 2007.

  1. #1
    I am having a issue with my htaccess currently if you click a link it does this

    BEFORE CLICK: http://www.mywebsite.com
    AFTER CLICK: http://www.mywebsite.comlinks/
    It should be: http://www.mywebsite.com/links

    
    RewriteEngine on
    RewriteRule ^([^-]+).css$ $1.css [L]
    RewriteRule ^([^-]+).js$ $1.js [L]
    RewriteRule ^([^-]+).xml$ $1.xml [L]
    RewriteRule ^([A-Z]|[a-z]|[0-9])/([^-]+)/?$ searchResult.php [L]
    RewriteRule ^([A-Z]|[a-z]|[0-9])([/])$ searchResult.php [L]
    RewriteRule [\/*?]([^-]+).html$ searchResult.php [L]
    RewriteRule ([^-]+).html$ searchResult.php [L]
    RewriteRule ^search.now$ searchResult.php [L]
    RewriteRule ^search.now?q=([^-]+)$ search.php?q=$2 [L]
    
    Code (markup):
    Any is help appreciated
     
    mr_bill, Jul 19, 2007 IP
  2. bouncer69

    bouncer69 Peon

    Messages:
    978
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    0
    #2
    RewriteEngine on
    RewriteRule ^([^-]+).css$ $1.css [L]
    RewriteRule ^([^-]+).js$ $1.js [L]
    RewriteRule ^([^-]+).xml$ $1.xml [L]
    RewriteRule ^([A-Z]|[a-z]|[0-9])/([^-]+)/?$ searchResult.php [L]
    RewriteRule ^([A-Z]|[a-z]|[0-9])([/])$ searchResult.php [L]
    RewriteRule [\/*?]([^-]+).html$ searchResult.php [L]
    RewriteRule ([^-]+)\.html$ searchResult.php [L]
    RewriteRule ^search.now$ searchResult.php [L]
    RewriteRule ^search.now?q=([^-]+)$ search.php?q=$2 [L]
    Code (markup):
    Try with RewriteBase / after the RewriteEngine on line if not work i'll fix the code for you.
     
    bouncer69, Jul 19, 2007 IP
  3. mr_bill

    mr_bill Banned

    Messages:
    1,292
    Likes Received:
    110
    Best Answers:
    0
    Trophy Points:
    135
    #3
    Thanks was a brain fart on my part. Forgot the trailing "/" in the config file :(

    Thank you
     
    mr_bill, Jul 19, 2007 IP