.htaccess - 用共享 ssl 重写 htaccess

标签 .htaccess mod-rewrite ssl url-rewriting shared

我的共享 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/

相关文章:

php - CodeIgniter Localhost 重定向到 xampp 主屏幕

.htaccess - htaccess 将 4 个特定页面重定向到 https

php - htaccess 规则将子文件夹重写为 GET 变量

java - Java 客户端上的 SSL 握手

ios - 客户端中的 Flutter HTTPS 握手错误(操作系统错误 : CERTIFICATE_VERIFY_FAILED: ok(handshake. cc:363))

javascript - 使用 Javascript 将地址栏中的哈希值替换为斜杠

linux - 服务器总是在 url 中添加后缀

使用通配符子域的 Apache SSL 重写

ssl - 使用客户端 SSL 唯一标识客户端