全球主机交流论坛

标题: joomla在GoDaddy主机上设置.htaccess办法 [打印本页]

作者: cpuer    时间: 2008-7-29 13:44
标题: joomla在GoDaddy主机上设置.htaccess办法
使用GoDaddy的主机,在设置joomla的页面静态化,将htaccess.txt改为.htaccess后,按照要求怎么设置也不行,设置完后页面就无法显示了,提示“500内部服务器错误”,在网上查找资料,研究linux下的.htaccess的语法,看看有什么不符合语法的,但是改来改去的,还是不行。
后来,把 #RewriteBase / 改为 RewriteBase /后,问题搞定。godaddy的主机就是这么搞怪。
如果不会设置的话,就把下面的那段代码拷贝下来,然后把文件命名为.htaccess就行。
## Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

#
# mod_rewrite in use

RewriteEngine On

# Uncomment following line if your webserver’s URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root)

RewriteBase /

########## Begin - Joomla! core SEF Section
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section

########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## 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

作者: rizhaotianzhi    时间: 2008-8-13 12:01
提示: 作者被禁止或删除 内容自动屏蔽
作者: cpuer    时间: 2008-8-13 13:23
标题: 回复 2# 的帖子

作者: justdoitrocky    时间: 2010-11-4 15:10
   很久之前也被这个烦过
作者: 狒狒    时间: 2010-11-4 17:45
提示: 作者被禁止或删除 内容自动屏蔽




欢迎光临 全球主机交流论坛 (https://hostloc.gdisk.cf/) Powered by Discuz! X3.4