0
我已經將網站導入到本地主機,主頁開放很好,但鏈接導致404,我使用codeigniter,它使用htaccess跳過索引.PHP加載它的控制器和我認爲,讓這些404的原因被跳過的htaccess ...我的htaccess在localhost上的網站上工作時被忽略
謝謝
的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
顯示我們的代碼,如果你想知道答案:) – Jonast92
你正在運行Apache或IIS? – Pitchinnate
ubuntu上的apache – user2553832