htaccess rewrite rule url
I want to write htaccess rules where I can rewrite this
www.example.com/Project_Name/1/23 project.h开发者_如何学Gotml?n=$1&p=$2&i=$3
I have this already, but the problem is that I have a file in /projects/projects.xml which gets rewritten as well when I call it with Ajax.
RewriteRule ^([\._\-a-zA-Z0-9]*)\/([0-9]*)\/([0-9]*)(.?)$ /project.html?n=$1&p=$2&i=$3 [NC]
Try adding RewriteCond %{REQUEST_FILENAME} !-f
above the RewriteRule. Assuming projects.xml is an actual file, that should prevent rewriting.
精彩评论