.htaccess hard problem

Discussion in 'Apache' started by punkrazio, May 9, 2008.

  1. #1
    This is my htaccess file:

    RewriteEngine ON

    RewriteBase /www.imexserve.it/

    RewriteRule ^product-category\.html$ pcategory\.php [L]

    RewriteCond %{REQUEST_URI} !^(.*)guide-(.*)\.html
    RewriteCond %{REQUEST_URI} !^(.*)microbiological-test-(.*)\.html
    RewriteCond %{SCRIPT_FILENAME} !^(.*)inpage\.php
    RewriteRule ^(.*)\.html$ pcategory\.php?path=$1 [L]

    RewriteCond %{REQUEST_URI} !^(.*)guide-(.*)\.html
    RewriteCond %{REQUEST_URI} !^(.*)microbiological-test-(.*)\.html
    RewriteCond %{SCRIPT_FILENAME} !^(.*)inpage\.php(.*)
    RewriteRule ^(.*)-page-(.0-9)\.html$ pcategory\.php?path=$1&pg=$2 [L]

    RewriteCond %{REQUEST_URI} ^(.*)guide-(.*)\.html
    RewriteRule ^guide-(.*)\.html$ guide\.php?guida=$1 [L]

    RewriteCond %{REQUEST_URI} ^(.*)microbiological-test-(.*)\.html
    RewriteRule ^microbiological-test-(.*)\.html$ mbtest\.php?mb=$1 [L]

    RewriteCond %{SCRIPT_FILENAME} ^(.*)inpage.php
    RewriteRule ^(.*)\.html$ inpage\.php?permalink=$1 [L]


    without these lines:

    RewriteCond %{SCRIPT_FILENAME} ^(.*)inpage.php
    RewriteRule ^(.*)\.html$ inpage\.php?permalink=$1 [L]

    everything works good, instead with that when i try to rewrite a page that access to inpage.php?permalink=...
    i got a conflict with these lines:


    RewriteCond %{REQUEST_URI} !^(.*)guide-(.*)\.html
    RewriteCond %{REQUEST_URI} !^(.*)microbiological-test-(.*)\.html
    RewriteCond %{SCRIPT_FILENAME} !^(.*)inpage\.php
    RewriteRule ^(.*)\.html$ pcategory\.php?path=$1 [L]

    without the rewritecond nothing work except pcategory.php

    can u help me plz??
     
    punkrazio, May 9, 2008 IP