公告
财富商城
积分规则
提问
发文
2020-03-31 04:03发布
Ridiculous、
Using .htaccess, I need to redirect all requests from
https://www.domain
to
https://domain
RewriteEngine On RewriteCond HTTPS !on RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L,QSA]
This should do it
via mod_rewrite manual
[EDIT] swapped "www.example.com" to %{SERVER_NAME} so it redirects to same name you've tried to access, but via https...
Assuming you have mod_rewrite enabled in your Apache configuration, you will need this in your .htaccess file.
RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://example.com/$1 [R,L]
最多设置5个标签!
This should do it
via mod_rewrite manual
[EDIT] swapped "www.example.com" to %{SERVER_NAME} so it redirects to same name you've tried to access, but via https...
Assuming you have mod_rewrite enabled in your Apache configuration, you will need this in your .htaccess file.