我在笔记本电脑(本地主机:8080)上使用 VertrigoServ 2.27。
重写模块已启用,我使用 alice.html 和 bob.html 示例(http://stackoverflow.com/questions/6944521/url-rewriting-on-localhost)对其进行了测试,它与 www-subfolder 中的 .htacces 一起使用。而且我还在 .htaccess 中放入了垃圾文本,我从 Apcheserver 收到错误,所以 rewrite mod 正在运行并且我使用规则。
这是规则:(在/www/folder1/.htaccess 中) 选项 +FollowSymLinks 重写引擎开启 RewriteRule /(.*) /index.php?disp=$1 [QSA,L]
因此,当我将此 url 放入浏览器时,我的索引页面加载正常。 http://localhost:8080/folder1/index.php
问题就在这里:当我通过 index.page(login page) 请求登录并通过单击发送按钮将 url 发送到 localhost 服务器时,url 更改为 localhost:8080/login,它应该是 localhost:8080/folder1/login
- 如何在 url 中保留子文件夹名称?
我想像这样转换网址:www.best-food-of-the-usa.com/index.php?operation=top&state=arizona& city=mesa&limit=10
喜欢这个:www.best-food-of-the-usa.com/arizona/mesa/top10.html
任何帮助表示赞赏。谢谢\何塞