nginx

location / {

   if (!-e $request_filename) {
      rewrite ^/(.*)$ /index.php/$1 last;
   }  
}

location /m/ {

   if (!-e $request_filename) {
      rewrite ^/(.*)$ /m/index.php/$1 last;
   }  
}

apache

RewriteEngine on
RewriteCond $1 !^(index.php|js|css|image|robots.txt|favicon.ico)
RewriteRule ^(.*)$ index.php/$1 [L]

RewriteEngine on
RewriteCond $1 !^(index.php|js|css|image|robots.txt|favicon.ico)
RewriteRule ^(.*)$ /m/index.php/$1 [L]

因为要用到ssl,还是比较喜欢nginx。

标签: none

添加新评论