分享几条伪静态规则的写法 .htaccess

RewriteEngine on                                                      #打开URL重写 
RewriteCond %{HTTP_HOST}     ^([a-z0-9\-]+)\.yule\.me$           #配置HOST里面的东东,比如www.yule.me 
#RewriteCond %{HTTP_HOST}     !^(www)\.yule\.me$                 #配置为www打头就不去URL重写 
RewriteCond %{REQUEST_URI}   !^/images(.*)$                           #REQUEST_PATH中/images不重写 
RewriteCond %{REQUEST_URI}   !^/style(.*)$ 
RewriteCond %{REQUEST_URI}   !^/js(.*)$ 
RewriteCond %{REQUEST_URI}   !^/script(.*)$ 
RewriteCond %{REQUEST_URI}   !^/(.*)\.html$                           #REQUEST_PATH中静态部分不用重写 

你可能感兴趣的:(html,PHP)