|
要把
xxx.com/user/user/questiondetail?id=1
设置为:
xxx.com/question/1.html
在apache中已经设置去掉了index.php,
RewriteEngine On
RewriteCond %{REQUEST_URI} !((^/(css|js|image|images)/)|((\.(css|js|png|jpe?g|swf|gif|ico|php|s?html)|robots
\.txt|crossdomain\.xml)$))
RewriteRule (.*) /index.php/$1 [C]
在此基础上添加了一条规则
RewriteRule ^/question/([0-9]+).html$ /user/user/questiondetail?id=$1 [L]
重启之后总是不起作用,访问404找不到,请问如何解决?
|
|