RewriteRule formular cautare
Scris: Vin Ian 24, 2014
Buna seara,
Am creeat un formular de cautare iar in htaccess am bagat:
Am intampinat o problema cand de exemplu am :
http: //localhost/search/intel/(.*)/(.*)/~ si in htaccess am pentru aceasta linie
am
Vreau ca celelalte elemente dupa search/(.*)/ sa fie ignorate daca nu am specificat nimic pentru ele in htaccess.
Am creeat un formular de cautare iar in htaccess am bagat:
Cod: Selectaţi tot
RewriteRule ^search/(.*)/pg/(.*)(/)?$ search.php?page=$2&q=$1 [NC,L]
RewriteRule ^search/(.*)/sort/(.*)/pg/([0-9])$ search.php?page=$3&q=$1&sort=$2 [NC,L]
RewriteRule ^search/(.*)/sort/(.*)/?$ search.php?q=$1&sort=$2 [NC,L]
RewriteRule ^search/(.*)/sort/$ search.php?q=$1 [NC,L]
RewriteRule ^search/(.*)/(.*)/$ search.php?q=$1 [NC,L]
RewriteRule ^search/(.*)/(.*)$ search.php?q=$1 [NC,L]
RewriteRule ^search/(.*)/pg/$ search.php?q=$1 [NC,L]
RewriteRule ^search/(.*)/$ search.php?q=$1 [NC,L]
RewriteRule ^search/(.*)(/)?$ search.php?q=$1 [NC,L]
RewriteRule ^search(/)?$ search.php [NC,L]
RewriteRule cautare(/)? cautare.php [NC,L]
http: //localhost/search/intel/(.*)/(.*)/~ si in htaccess am pentru aceasta linie
am
Cod: Selectaţi tot
RewriteRule ^search/(.*)/$ search.php?q=$1 [NC,L]