htaccess file help

Discussion in 'Apache' started by dannbkk, Jun 12, 2007.

  1. #1
    Can anyone see a problem in this htaccess file. its not communicating 100% with my server, what i mean by that is all the links when clicked on in my website are working but some are going to a default/incorrect database page.


    Options +Indexes
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    
    RewriteRule ^buy-category-car-for-sale-(.*)-([0-9]+)-([0-9]+).php search.php?category=$2&_p=$3
    
    RewriteRule ^buy-industry-car-for-sale-(.*)-([0-9]+)-([0-9]+).php search.php?industry=$2&_p=$3
    
    RewriteRule ^buy-countries-car-for-sale-(.*)-([0-9]+)-([0-9]+).php search.php?countries=$2&_p=$3
    
    RewriteRule ^buy-price-car-for-sale-(.*)-([0-9]+)-([0-9]+).php search.php?price=$2&_p=$3
    
    RewriteRule ^(.*)-([a-zA-Z0-9]+).php summary_details.php?ID=$2
    PHP:
     
    dannbkk, Jun 12, 2007 IP
  2. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #2
    Options +FollowSymLinks +Indexes
    RewriteEngine on
    RewriteBase /
    RewriteRule ^buy\-category\-car\-for\-sale\-([^.]+)\-([0-9]+)\-([0-9]+)\.html$ search.php?category=$2&_p=$3 [L]
    RewriteRule ^buy\-industry\-car\-for\-sale\-([^.]+)\-([0-9]+)\-([0-9]+)\.html$ search.php?industry=$2&_p=$3 [L]
    RewriteRule ^buy\-countries\-car\-for\-sale\-([^.]+)\-([0-9]+)\-([0-9]+)\.html$ search.php?countries=$2&_p=$3 [L]
    RewriteRule ^buy\-price\-car\-for\-sale\-([^.]+)\-([0-9]+)\-([0-9]+)\.html$ search.php?price=$2&_p=$3 [L]
    RewriteRule ^([^.]+)\-([a-zA-Z0-9]+)\.html$ summary_details.php?ID=$2 [L]
     
    Nintendo, Jun 12, 2007 IP
  3. dannbkk

    dannbkk Well-Known Member

    Messages:
    1,403
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    120
    #3
    still not much luck when i click on a link it tells me this;

    The requested URL /buy-category-car-for-sale-Bangkok-1-1.php was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
    Apache/1.3.36 Server at ww.carsalesearch.com Port 80
     
    dannbkk, Jun 12, 2007 IP
  4. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #4
    Change .php to .html
     
    Nintendo, Jun 12, 2007 IP
  5. dannbkk

    dannbkk Well-Known Member

    Messages:
    1,403
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    120
    #5
    where? you mean search.php - search.html ?
     
    dannbkk, Jun 12, 2007 IP
  6. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #6
    Nintendo, Jun 12, 2007 IP