我已经将一个网站导入到我的本地主机,主页打开很好,但链接指向 404,我正在使用 codeigniter,它使用 htaccess 跳过 index.php 来加载它的控制器,我相信得到这些的原因404s 正在跳过 htaccess ...
谢谢
htaccess 代码:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|public|images|robots\.txt|css|swf)
RewriteRule ^(.*)$ index.php/$1 [L]
虚拟主机代码:
DocumentRoot /var/www/mysite.com/public_html
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/mysite.com/public_html/>
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
#AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined