PHP代码手册地图
.htaccess强制https、www、防盗链
RewriteEngine on

#非https访问时强制转https
RewriteCond %{HTTP:From-Https} !^on$ [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

#非www访问时强制转www
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]

#图片防盗链
RewriteCond %{HTTP_REFERER} !^https://mdaima.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://mdaima.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.mdaima.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.mdaima.com$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|png|bmp|swf|mp3|wav|zip|rar)$ https://www.mdaima.com/images/logo.gif [R,NC]

RewriteRule ^index\.html$ index.php
RewriteRule ^lilei\.html$ show_m.php?place_area=1
RewriteRule ^lilei-([0-9]+)\.html$ show_m.php?place_area=1&page_1=$1&%{QUERY_STRING}
RewriteRule ^shengming\.html$ show_m.php?place_area=2
RewriteRule ^help\.html$ show_m.php?place_area=3
RewriteRule ^contact\.html$ show_m.php?place_area=4
RewriteRule ^jifen\.html$ show_m.php?place_area=5
RewriteRule ^advantage\.html$ show_m.php?place_area=6
RewriteRule ^payment\.html$ show_m.php?place_area=7


Copyright © 2014-2024 www.mdaima.com All Rights Reserved. 李雷博客 常用PHP/JS/JQ/MYSQL代码手册 PHP代码手册地图