htaccess 实现网址缩短

访问 :app.xxx.com/a

解析到:app.xxx.com/index.php/app/a

 

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule http://app.xxx.com  http://m.xxx.com

RewriteCond %{HTTP_HOST} app.xxx.com
RewriteCond %{REQUEST_URI} !^/index\.php
RewriteRule ^(.*)$  /index.php/app/$1 
</IfModule>

 

你可能感兴趣的:(htaccess 实现网址缩短)