mod_rewrite 不带变量的虚拟目录
我还没有为此想出解决方案。我想要有多个虚拟目录,但无法找到如何在不使用 PHP 或某种变量的情况下做到这一点。比如我想要:
mysite.com/restaurant/ to point to mysite.com/restaurant.php
mysite.com/restaurant/menu/ to point to mysite.com/restaurant-menu.php
mysite.com/restaurant/location/ to point to mysite.com/restaurant-location.php
等等,没有动态内容;我有所有的文件。
I haven't come up with a solution for this. I want to have multiple virtual directories but cant find how to do it without using PHP or some sort of variables. For example I want:
mysite.com/restaurant/ to point to mysite.com/restaurant.php
mysite.com/restaurant/menu/ to point to mysite.com/restaurant-menu.php
mysite.com/restaurant/location/ to point to mysite.com/restaurant-location.php
And so on, there is no dynamic content; I have all the files.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用
mod_rewrite
来做到这一点!you can use
mod_rewrite
to do that!