[求助] 伪静态 二级目录怎么编写

2018-03-25 18:34

网站在根目录的话是正常的。
但是我放在二级目录   zx/ 里面
但是访问  www.xxx.com/zx 总是跳到根目录的网址。
如果把.htaccess 删除 就提示无法访问。
应该是伪静态规则需要更改路径。 请问下如何修改。万分感谢

根目录是dz程序
/zx   二级目录是supesite程序

下面是完整原来supesite的伪静态规则。


<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond % !^$
RewriteRule data/(.*).(php)$ ? [F]
RewriteRule cache/(.*),马会开奖结果特供.(php)$ ? [F]
RewriteRule attachments/(.*).(php)$ ? [F]
RewriteRule themes/(.*).(html)$ ? [F]

RewriteRule ^index\.html$ /index.php [NC,L]
RewriteRule ^top-([a-z]+)$ /index\.php\?action/channel/name/$1 [NC,L]
RewriteRule ^qqlevel-([0-9]+).html /index\.php\?action/channel/name/qqlevel/uin/$1 [L]
RewriteRule ^qqmusic-([0-9]+).html /index\.php\?action/channel/name/qqmusic/uin/$1 [L]
RewriteRule ^friend-([0-9]+).html /index\.php\?action/channel/name/friend/uin/$1 [L]
RewriteRule ^category(.+)$ /index\.php\?action/category/catid$1 [L]
RewriteRule ^viewnews(.+)$ /index\.php\?action/viewnews/itemid$1 [L]
RewriteRule ^action(.+)$ /index\.php\?action$1 [L]
RewriteRule ^jdyl/type/([0-9]+)/([0-9]+).html /index\.php\?action/channel/name/jdyl/type/$1/id/$2 [L]
RewriteRule ^niandu/2015/$ /niandu\.php\?y2015 [L]
RewriteRule ^qqgujia-([0-9]+).html /index\.php\?action/channel/name/qqgujia/uin/$1 [L]

RewriteRule ^/([0-9]+)$ /index\.php\?uid/$1 [L]
RewriteRule ^/([0-9]+)/spacelist(.+)$ /index\.php\?uid/$1/action/spacelist/type$2 [L]
RewriteRule ^/([0-9]+)/viewspace(.+)$ /index\.php\?uid/$1/action/viewspace/itemid$2 [L]
RewriteRule ^/([0-9]+)/viewbbs(.+)$ /index\.php\?uid/$1/action/viewbbs/tid$2 [L]
#RewriteRule ^/([0-9]+)/(.*)$ /index\.php\?uid/$1/$2 [L]
#RewriteRule ^/viewthread(.+)$ /index\.php\?action/viewthread/tid$1 [L]
#RewriteRule ^/mygroup(.+)$ /index\.php\?action/mygroup/gid$1 [L]
#RewriteRule ^/play-([0-9]+)-(.+)$ /index\.php\?action/channel/name/play/uin/$1/id/$2 [L]
#RewriteRule ^/kjlevel-([0-9]+).html /index\.php\?action/channel/name/kjlevel/uin/$1 [L]
#RewriteRule ^/hzlevel-([0-9]+).html /index\.php\?action/channel/name/hzlevel/uin/$1 [L]
#RewriteRule ^/qqmood-(.+)$ /index\.php\?action/channel/name/qqmood/uin/$1 [L]
#RewriteRule ^/qqphoto-([0-9]+).html /index\.php\?action/channel/name/qqphoto/uin/$1 [L]
#RewriteRule ^/qqhot-([0-9]+).html /index\.php\?action/channel/name/qqhot/uin/$1 [L]
#RewriteRule ^/qqpet-([0-9]+).html /index\.php\?action/channel/name/qqpet/uin/$1 [L]
#RewriteRule ^/profile-(.+)$ /index\.php\?action/channel/name/profile/uin/$1 [L]
#RewriteRule ^/uplevel-(.+)$ /index\.php\?action/channel/name/uplevel/uin/$1 [L]
#RewriteRule ^/qqphoto-([0-9]+)-(.+)-([0-9]+).html /index\.php\?action/channel/name/qqphoto/uin/$1/id/$2/type/$3 [L]
#RewriteRule ^/qqphoto-([0-9]+)-(.+),采金网彩卷网彩金网香港马会开奖.html /index\.php\?action/channel/name/qqphoto/uin/$1/id/$2 [L]
#RewriteRule ^/gj([0-9]+).jpg /qqphoto/\?pid=$1 [L]

</IfModule>