apache - How to write a .htaccess rule
PHP中文网
PHP中文网 2017-05-16 17:01:07
0
1
485

Used typecho Currently it is pseudo-static

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/ [L]

Recently, HTTPS CDN has been added. How can we automatically jump from http 301 to https (of course, we must also keep pseudo-static)?
What I found on Google are basically wordpress rules. I modified them and used them. , chrome access will prompt multiple redirection
I am familiar with nginx, but there is no way to change the web server. I hope friends who know more can give me some advice. Thank you.

PHP中文网
PHP中文网

认证0级讲师

reply all(1)
滿天的星座

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://domain name/$1 [R,L]
or
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://domain name/$1 [L,R=301]

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!