5
我已將文件和數據庫從BradPPresents.com複製到BradP.com。.HTACCESS導致內部服務器錯誤的文件
需要.htaccess文件才能使頁面正常顯示,因爲「漂亮的URL」由joomla!啓用。
您可以看到數據庫和所有連接都在http://bradp.com/index.php上工作,但http://bradp.com/home.html不起作用,因爲它依賴於.htaccess文件來解析URL。
我從bradppresents.com(目前工作正常)複製相同的htaccess文件到bradp.com,當文件存在時,我得到「內部服務器錯誤」。一旦它被刪除,錯誤消失,但當然,該網站不會按需要工作。
我希望有人能爲我發光一點點。
這裏的.htaccess文件
RewriteEngine On
RewriteBase/
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|\.aspx|\.asp|/[^.]*)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#max files size restrictions
php_value upload_max_filesize 20M
php_value post_max_size 20M
下面是Apache的站點配置文件。
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /home/nick/public_html/bradp.com/html/
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /home/nick/public_html/bradp.com/html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
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 /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
它實質上是一個默認的文件,有一些變化。
我真的很感謝任何幫助,我可以得到; 感謝百萬, 尼克
在問你應該看看日誌文件。 – Gumbo 2009-02-13 10:18:51
甚至沒有想過檢查。謝謝。 – 2009-02-13 10:25:49