Multiple mappings in .htaccess files don't work
I have this mapping in my .htaccess file
RewriteRule outdoors/trees/(.*)/(.*) o开发者_高级运维utdoors/trees/tree.php?tree_id=$1
RewriteRule outdoors/parks/(.*)/(.*) outdoors/parks/park.php?tree_id=$1
For some reason the mapping to the trees works, but the one to the parks does not. What I am trying to do is have a url like this: http://www.comehike.com/outdoors/parks/park.php?park_id=1
to redirect to one that looks like this: http://www.comehike.com/outdoors/parks/3/ParkName
Any idea why that isn't working with the redirects I showed above?
Thanks, Alex
The LAST
flag may work.
RewriteRule outdoors/trees/(.*)/(.*) outdoors/trees/tree.php?tree_id=$1 [L]
RewriteRule outdoors/parks/(.*)/(.*) outdoors/parks/park.php?tree_id=$1 [L]
EDIT: Typo in park_id
RewriteRule outdoors/trees/(.*)/(.*) outdoors/trees/tree.php?tree_id=$1 [L]
RewriteRule outdoors/parks/(.*)/(.*) outdoors/parks/park.php?park_id=$1 [L]
精彩评论