云虚拟主机配置url-rewrite

xingyun86 2018-3-27 1058

conf.php配置

  'url_rewrite_on' => 1,

.httpaccess配置

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-f 

#RewriteRule ^(.*?)([^/]*)$ $1index.php?$2 [QSA,PT,L]
#RewriteRule ^(.*?)([^/]*)\.htm(.*)$ $1/index.php?$2.htm$3 [L]
#RewriteRule ^/([^/]+)\.htm$ /index.php?$1 [L]
#RewriteRule ^/admin/([^/]+)\.htm$ /admin/index.php?$1 [L]

RewriteRule ^admin/(.*)\.htm(.*)$ admin/index.php?$1.htm$2 [L]
RewriteRule ^mobile(.*)\.htm mobile/index.php?$1.htm$2 [L]
RewriteRule ^(.*)\.htm(.*)$ index.php?$1.htm$2 [L]

#RewriteRule ^/mobile(.*)\.htm(.*) /mobile/index.php?$1.htm$2 [L]
#RewriteRule ^/admin(.*)\.htm(.*) /admin/index.php?$1.htm$2 [L]
#RewriteRule ^(.*)\.htm(.*)$ index.php?$1.htm$2 [L]
</IfModule>


×
打赏作者
最新回复 (0)
只看楼主
全部楼主
返回