URL路由

浏览:814 发布日期:2013/09/03 分类:求助交流 关键字: URL 路由
用.htaccess 可以实现,但是由于空间不支持这种文件<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^index.php/Travel/index/(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\d+).html$ index.php?m=Travel&a=index&aid=$1&arrivedport=$2&scenicid=$3&duration=$4&price=$5&favorable=$6&o=$7&p=$8 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\?]*)\??(.*)$ /index.php?s=$1&$2 [QSA,PT,L]
</IfModule>
所以想想使用tp自带的URL路由功能完成'URL_ROUTER_ON' => true, //开启路由
    'URL_ROUTE_RULES' => array(//定义路由规则
        '/^index.php/Travel/index/(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\d+)-(\d+).html$/'
        =>
        'index.php?m=Travel&a=index&aid=:1&arrivedport=:2&scenicid=:3&duration=:4&price=:5&favorable=:6&o=:7&p=:8'
    )
配置了,可是并没效果,求助广大phper帮忙
最佳答案
评论( 相关
后面还有条评论,点击查看>>