简体   繁体   English

斜杠删除htaccess和Apache服务器的错误

[英]Trailing slash remove bug with htaccess and apache server

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} ^(.*)/(.*)/exam$
RewriteRule ^(.*)/(.*)/exam$ exampage.php?vname=$1&ecode=$2 [L]

i want URL like "mysite.com/hp/000-120/exam" but the above code is not working can any body help? 我想要类似“ mysite.com/hp/000-120/exam”的URL,但以上代码无法正常工作,请问任何机构可以帮忙吗?

您可能仅需采取以下行动即可:

RewriteRule ^/?([^/]+)/([^/]+)/exam$ exampage.php?vname=$1&ecode=$2 [L]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM