2011-01-28 74 views
2

我工作的巔峯車 - 但問題是,當我試圖設置爲「啓用固定網址的一代」,它說:的.htaccess問題

請注意:寫入錯誤」的.htaccess'文件。請檢查文件權限。

我不確定它應該是哪個權限。我知道它也需要mod_rewrite。我不熟悉.htaccess和mod_rewrite。

chmod 644 .htacesss根本不起作用。所以我猜如果我不用mod_rewrite做任何事情,那麼.htaccess不工作?

我所做的: CHOWN根的.htaccess CHOWN 644的.htaccess

例如:

RewriteEngine On 
RewriteBase /
RewriteCond  $1 !^(\#(.)*|\?(.)*|\.buildpath(.)*|.svn\/(.)*|admin\.php(.)*|content\/(.)*|download\.php(.)*|images\/(.)*|index\.php(.)*|install\/(.)*|login\.php(.)*|readme\.txt(.)*|robots\.txt(.)*) 
RewriteRule  ^(.+)$ index.php?url=$1 [L] 

的一個問題是,它會造成的.html將下降聯機。所以我必須補充「*|home\.html(.)*

請給我見識這個,感謝您

回答

2

chown文件(.htaccess)是否設置所有者PHP的用戶,然後chmod 755這應該做的伎倆:)

加上你想要的:RewriteEngine On見下面

RewriteEngine on 
RewriteBase/
RewriteCond $1 !^(#(.)|\?(.)|.buildpath(.)|.svn\/(.)|admin.php(.)|content\/(.)|download.php(.)|images\/(.)|index.php(.)|install\/(.)|login.php(.)|readme.txt(.)|robots.txt(.)*) 
RewriteRule ^(.+)$ index.php?url=$1 [L] 
+0

PHP的用戶?你的意思是根?對不起,我對術語不太熟悉。我確實打開了rewriteEngine,但.html文件已關閉。所以我猜我需要添加.html? – joe 2011-01-28 09:30:51