我有一个mod_rewrite在http上工作正常,但在https上没有。
堆栈溢出到类似问题的一些答案建议添加RewriteBase /,但我已经有了。
我在共享服务器上托管在godaddy上。我已经联系过godaddy 3次,他们说他们无能为力。
以下是重写的示例:
不重写的网址:
https://www.funded.today/stats/?p=bloodstained-ritual-of-the-night
Mod_Rewrite网址:
https://www.funded.today/stats/iga/bloodstained-ritual-of-the-night
我的htaccess文件如下:
RewriteEngine On
RewriteCond %{SERVER_PORT} !=443
RewriteCond %{HTTP_HOST} ^(www\.)?funded\.today$ [NC]
RewriteRule ^$ https://www.funded.today/%{REQUEST_URI} [R,L]
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^stats/(.*)/(.*)$ /stats/?p=$2 [P,QSA]
# BEGIN s2Member GZIP exclusions
<IfModule rewrite_module>
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} (^|\?|&)s2member_file_download\=.+ [OR]
RewriteCond %{QUERY_STRING} (^|\?|&)no-gzip\=1
RewriteRule .* - [E=no-gzip:1]
</IfModule>
# END s2Member GZIP exclusions
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^stats/(.*)/(.*)$ - [L,NC]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
非常感谢任何帮助或想法!