URL使用HTACCESS从一个URL重定向到另一个URL
这是我的.htaccess文件中的
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /dev/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /dev/index.php [L]
</IfModule>
目前, /代码> 在这方面,有人可以帮我吗?
Currently this is in my .htaccess file
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /dev/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /dev/index.php [L]
</IfModule>
But when ever user enters this url http://test-site.com
should redirect to http://test-site.com/dev/
Could any one please help me in this regard?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试显示样本,尝试,请尝试遵循HTACCESS规则文件。在测试URL之前,请确保清除浏览器缓存。我还在新规则和现有规则的小修复之前提出了评论。
With your shown samples, attempts, please try following htaccess rules file. Please make sure to clear your browser cache before testing your URLs. I have also put comments before new rule and before a small fix in existing rule.