例如:http://www.xxxx.com/index.php/Index/index/n/50
把这个url重写成:
http://www.xxxx.com/50
而不影响其他模块
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] 这样只是把index.php去掉了,
访问首页的时候需要http://www.xxxx.com/50这样的效果
其他的还是:http://www.iwebo.dev/Setting/index
只是去掉index.php写成这样:
RewriteRule ^(.*)$ index.php/Index/index/n/$1 [QSA,PT,L]
会影响全部模块的访问
在纠结,还请各位帮忙看看...
把这个url重写成:
http://www.xxxx.com/50
而不影响其他模块
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] 这样只是把index.php去掉了,
访问首页的时候需要http://www.xxxx.com/50这样的效果
其他的还是:http://www.iwebo.dev/Setting/index
只是去掉index.php写成这样:
RewriteRule ^(.*)$ index.php/Index/index/n/$1 [QSA,PT,L]
会影响全部模块的访问
在纠结,还请各位帮忙看看...
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)$ index.php/$1 [L]
</IfModule># Turn on these settings to get A in yslow. :)
# <IfModule mod_expires.c>
# ExpiresActive On
# ExpiresByType image/gif A2592000
# ExpiresByType image/jpeg A2592000
# ExpiresByType image/png A2592000
# ExpiresByType image/x-icon A2592000
# ExpiresByType application/javascript A2592000
# ExpiresByType application/x-shockwave-flash A2592000
# ExpiresByType text/css A604800
# </IfModule>
#
# <IfModule mod_deflate.c>
# AddOutputFilterByType DEFLATE text/html text/css application/javascript
# </IfModule>
#
# FileEtag none
修改路由规则为:RouteName'=>array('Index', 'index', 'n', '额外参数').
http://www.xxxx.com/index.php/Index/index/n/50
等效于:
http://www.xxxx.com/50