<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /forum
RewriteRule ^((Index|List|Content|admin|Vote|Message|Favor).*)$ index.php/$1
</IfModule>提示
Not FoundThe requested URL /forum/List-index-f-2.shtml was not found on this server.Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.但是我写
RewriteRule 1.php 2.php 又是对的,令人费解
RewriteEngine On
RewriteBase /forum
RewriteRule ^((Index|List|Content|admin|Vote|Message|Favor).*)$ index.php/$1
</IfModule>提示
Not FoundThe requested URL /forum/List-index-f-2.shtml was not found on this server.Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.但是我写
RewriteRule 1.php 2.php 又是对的,令人费解
url重写对于正则不是很友好啊。
在这里买的http://www.52host.net/shared-hosting
我买的68元的
你说一下 RewriteBase /forum 中的 forum 的含义
forum 就是一个位于根目录的文件夹名称
RewriteBase 指令用于声明一个别名,以便重构url时替换成真实路径
当然你还得要有 alias 指令了如果你的 forum 是真实存在的,那么就不是别名了
为此你需要把 .htaccess 文件放在 forum 目录中<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^((Index|List|Content|admin|Vote|Message|Favor).*)$ index.php/$1
</IfModule>
那你也可考虑在规则前冠以 forum/
发不了你私信,我把ftp信息给你,你看看。