开发者

htaccess rewrite rule url

开发者 https://www.devze.com 2023-04-13 02:16 出处:网络
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 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号