L'ordine delle rule e cond è importante, soprattuto perchè nelle cond l'"AND" è implicito.
http://httpd.apache.org/docs/current...ml#rewritecond
6. ..............
............
'ornext|OR' (or next condition)
Use this to combine rule conditions with a local OR instead of the implicit AND.......
.........
da come la hai scritta tu questo è un unico blocco:
codice:
RewriteCond %{REQUEST_URI} ^- //AND
RewriteCond %{REQUEST_FILENAME} -f [OR]
// se continete - ed è un file che esiste altrimenti se è una cartella ->
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)\/(.*)_p_(.*).html$ product_info.php?products_id=$3&%{QUERY_STRING} [L]
Le regole che ti ho consigliato, se questo è il contenuto attuale dell'htaccess:
codice:
RewriteEngine On
RewriteBase /catalog/
RewriteRule ^(.*)_p_(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)_c_(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)_m_(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
vanno messe subito dopo il RewriteEngine On
codice:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR] //se l'url richiesto è un file che esite
RewriteCond %{REQUEST_FILENAME} -d // se l'url richiesto è una cartella che esiste
RewriteRule . - [L] // non fare niente e salta il resto: flag [L]
RewriteBase /catalog/
RewriteRule ^(.*)_p_(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)_c_(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)_m_(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
EDIT
queste:
codice:
RewriteRule ^(.*)_p_(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)_c_(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)_m_(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
è meglio scriverle come:
codice:
RewriteRule ^(.*)_p_(.*).html$ product_info.php?products_id=$2 [L,QSA]
RewriteRule ^(.*)_c_(.*).html$ index.php?cPath=$2 [L,QSA]
RewriteRule ^(.*)_m_(.*).html$ index.php?manufacturers_id=$2 [L,QSA]
http://httpd.apache.org/docs/current...ml#rewriterule
http://httpd.apache.org/docs/current....html#flag_qsa
http://httpd.apache.org/docs/current...gs.html#flag_l