IP(FTP): 175.102.3.231
用户名: youyaxli
密码: 1r6wMki13Y
错误链接:http://www.youyax.com/forum/List-index-f-4.shtml
正确连接:http://www.youyax.com/forum/index.php/List-index-f-4.shtml
操作目的:地址栏重写去掉index.php
操作方法:编辑根目录的.htacess文件
服务器:Linux主机 Apache 2.2.23 + Nginx1.0.15
可以参考:https://wvw.52host.net/knowledgebase.php?action=displayarticle&id=176
httpd.ini的写法参考:
RewriteRule ^/forum/((Index|List|Content|admin|Vote|Message|Favor).*)$ /forum/index\.php/$1 [L]对于里面的文件,请不要恶意改动
用户名: youyaxli
密码: 1r6wMki13Y
错误链接:http://www.youyax.com/forum/List-index-f-4.shtml
正确连接:http://www.youyax.com/forum/index.php/List-index-f-4.shtml
操作目的:地址栏重写去掉index.php
操作方法:编辑根目录的.htacess文件
服务器:Linux主机 Apache 2.2.23 + Nginx1.0.15
可以参考:https://wvw.52host.net/knowledgebase.php?action=displayarticle&id=176
httpd.ini的写法参考:
RewriteRule ^/forum/((Index|List|Content|admin|Vote|Message|Favor).*)$ /forum/index\.php/$1 [L]对于里面的文件,请不要恶意改动
#如果目录存在就直接访问目录不进行RewriteRule
RewriteCond %{REQUEST_FILENAME} !-d
#如果文件存在,就直接访问文件,不进行下面的RewriteRule.(不是文件或文件不存在就执行重写)
RewriteCond %{REQUEST_FILENAME} !-f
#所有找不着实际路径的文件,统一交给index.php处理
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
得到
Array
(
.....
[REDIRECT_URL] => /forum/test/a/b/c
....
[REQUEST_URI] => /forum/test/a/b/c
[SCRIPT_FILENAME] => /home2/youyaxli/public_html/forum/test/index.php
[SCRIPT_NAME] => /forum/test/index.php
....
[ORIG_PATH_INFO] => /a/b/c
[ORIG_PATH_TRANSLATED] => /home2/youyaxli/public_html/forum/test/index.php
[PHP_SELF] => /forum/test/index.php
[REQUEST_TIME] => 1366441199
[argv] => Array
(
) [argc] => 0
)怎么能说是 它的url重写,后面部分貌似一定要真实的文件 呢?