Conditional .htaccess for URL
RewriteRu开发者_运维技巧le ^photographs/?$ photographs.php [L]
RewriteRule ^photographs/(.*)/?$ photographs.php?cat=$1 [L,QSA]
RewriteRule ^photographs/(.*)/(.*)/?$ photographs.php?cat=$1&page=$2 [L,QSA]
I need this to have options such as
- /photographs
- /photographs/category
- /photographs/category/3
Thanks
RewriteRule ^photographs/?$ index.php [L]
RewriteRule ^photographs/([^/]+)/?$ index.php?cat=$1 [L,QSA]
RewriteRule ^photographs/([^/]+)/([^/]+)/?$ index.php?cat=$1&page=$2 [L,QSA]
That's because (.*)
also matches /
character.
精彩评论