我的共享 ssl 是:https://server.domain.com/~username/folder/product.php?products_id=123
我在 htaccess 中使用 RewriteRule:
RewriteRule ^(.*)-p-([0-9]+).html$ product.php?products_id=$2&%{QUERY_STRING}
问题是,链接出现:https://server.domain.com/~username/folder/name-p-123.html 但是点击的时候出现page not found,因为~username/folder/
请问在这种情况下我该如何正确使用重写?
谢谢。
最佳答案
您可以使用 http://www.visiospark.com/mod-rewrite-rule-generator/
这很简单。请记住,我不是专家。几天前我在玩 .htaccess,规则没有为我的浏览器客户端更新。原因是它正在加载缓存。我使用 ctrl+shift+delete
从 firefox 中删除缓存,重新启动 httpd
/apache
并重新加载页面 ctrl+F5
(必须是 CTRL+F5 )。瞧,固定。
关于.htaccess - 用共享 ssl 重写 htaccess,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38039249/