如何使用 rewriterule 重定向到当前目录
如何使用 rewriterule 重定向到当前目录。 例如: http://www.mySite/directory/subdirectory/index.php
现在程序正在尝试转到 vvv.mySite/index.php
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
##RewriteRule . /index.php [L]
RewriteRule . index.php [L]
How can I redirect to current directory with rewriterule.
example: http://www.mySite/directory/subdirectory/index.php
now program is trying to goto
vvv.mySite/index.php
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
##RewriteRule . /index.php [L]
RewriteRule . index.php [L]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
删除
RewriteBase
指令使用物理路径。Remove the
RewriteBase
directive so that the physical path is used.