今天整了一下 apache的 rewrite功能,在写.htaccess时,发现一个问题折腾了半天
RewriteEngine On
RewriteBase /works/csfx/
#RewriteRule ^left\.html$ [color=red]/index.php[/color] 有斜杠时就不能正确的跳转,提示404错误了,去掉了就正常了.真怪 即使直接用 http://localhost//works/csfx//index.php 访问也正常
RewriteRule ^left\.html$ index.php
RewriteEngine On
RewriteBase /works/csfx/
#RewriteRule ^left\.html$ [color=red]/index.php[/color] 有斜杠时就不能正确的跳转,提示404错误了,去掉了就正常了.真怪 即使直接用 http://localhost//works/csfx//index.php 访问也正常
RewriteRule ^left\.html$ index.php