仝 tóng

关于wecenter在网站二级目录下.htaccess的rewrite规则

wecenter在网站的根目录下的规则在文章末尾,下面是网站的二级目录下的.htaccess规则
譬如,你的首页网站是一个程序,而wecenter则需要安装在二级目录下,如www.viyun.com/wecenter/, 下面是规则:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /shequ/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [L]
</IfModule>
Options -Indexes
ErrorDocument 403 http://www.viyun.com/error
Options +FollowSymLinks
DirectoryIndex index.php

下面是在一级目录下的规则:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
redirect 301 /index.html /
</IfModule>
Options -Indexes
ErrorDocument 403 http://www.your-site.com/error
Options +FollowSymLinks
DirectoryIndex index.php