How to fix .htaccess file for mod_rewrite and addhandler on godaddy subdomain如何修復。 htaccess文件mod_rewrite和addhandler關於godaddy子
4,365 views - 4365意見者:管Posted in: 張貼於:
4,365 views 4365意見
Please note: This page was originally written in English.請注意:此網頁最初是用英文寫的。
The original post can be viewed原來的文章可被視為 here這裡 . 。
Please note: This page was originally written in English.
The text has been translated using an online service such as Google or Babelfish.
The original post can be viewed here.
I’m writing this article specifically for people hosted on godaddy that have had the following .htaccess, mod_rewrite or addhandler problems on shared or premium hosting accounts for various open source applications, such as (but not limited to) Wordpress, Drupal, BBPress, Moodle, Geeklog, PHPNuke, Postnuke, and more!我寫這篇文章專門為人民託管在godaddy認為有以下幾點。 htaccess , mod_rewrite或addhandler問題或溢價共同主辦的各種帳目開源應用程序,如(但不限於) WordPress的, ,網站BBPress ,中文, Geeklog , PHPNuke , PostNuke的,以及更多!
Short list of potential issues:短名單中潛在的問題:
- problems with permalinks in Wordpress問題在WordPress的永久
- problems with clean URL’s in Drupal問題清潔網址的在Drupal
- problems with pretty url’s in BBPress問題很網址的在BBPress
- problems with Wordpress MU WordPress的問題,穆
- ANY mod_rewrite problems in a sub-directory, subdomain, sub-folder, mapped domain, ie, a domain you setup in goDaddy’s Domain Management -> Assign Domain to Hosting Site feature任何mod_rewrite問題的一個分目錄,子子文件夾,映射域,即域名設置在GoDaddy的域名管理-> “指定網域,以託管網站功能
I have struggled with two issues time and time again on a goDaddy shared or premium account.我掙扎,這兩個問題一次又一次地在goDaddy共享或溢價帳。 If I go into “Domain management -> Assign Domain” and “map” a domain to a folder of the root URL, I have problems with any site that needs to use an .htaccess file for “rewrite” the URL’s using a feature called “mod_rewrite” - especially Wordpress and Drupal.如果我進入“域名管理-> ”指定網域“和”地圖“網域到一個文件夾中的根網址,我有問題,任何網站,需要使用。 h taccess文件的”重寫“的網址的使用功能稱為“ mod_rewrite ” -尤其是D rupal和W ordPress的。
I came across a fix today that made all those problems go away forever.我發現今天的修補程序,使所有這些問題永遠消失。 To be able to do what I’m about to tell you, you must also be hosting your domain name with goDaddy .為了能夠做我要告訴你, 你還必須託管您的網域名稱與goDaddy 。
In your godaddy control panel, go to “Settings -> Domain Management”.在您的godaddy的控制面板,進入“設置-> ”域名管理“ 。
Click on “ Add New Record ” 點擊 “添加新記錄 ”
In the very first line note the IP address of your “@” host, as you’ll by typing this into the box that comes up when you click to add a new record.在第一行非常注意的IP地址“ @ ”所在,因為你會輸入到這一點的方塊,出現當您單擊添加一個新的紀錄。 In the first field type an asterik (*).在第一場鍵入一個asterik ( * ) 。 In the second field type the IP address of your “@” host.在第二個欄位中輸入的IP地址“ @ ”主機。 Leave the drop down at one hour.離開下拉在一小時之久。 Click “ok” to save.點擊“確定”保存。
That’s it - you’re done!這就是它-大功告成! There should be no fiddling with your .htaccess files at all.不應該有你的順藤摸瓜。 htaccess文件在所有。
Once I applied that simple fix - everything worked again.當我採用簡單修復-一切工作的一次。
I’ve also had problems when I’ve attempted to get .html or .htm files to parse PHP code as if they were .php files on goDaddy, or with applications that had to use PHP5.我也有問題時,我已經試圖獲得。 html或。熱媒檔案解析PHP代碼,就好像這些。 PHP文件上goDaddy ,或與應用程序必須使用PHP5 。 That fix is also really, really easy.這種修復也是真的,真的很容易。 All you have to do is create an .htaccess file with the following 2 lines:所有您需要做的就是創建一個。 htaccess文件,下面的兩行:
AddHandler x-httpd-php5 .php AddHandler的X的httpd - php5 。 PHP的
AddHandler x-httpd-php .php .htm html AddHandler的X的httpd - PHP的。 PHP中。熱媒的HTML





























January 24th, 2008 at 9:13 pm 08年1月24號在下午9點13分
Thanks for figuring this out.感謝搞清楚了這一點。
One suggestion, I believe you meant “Settings -> DNS Manager†instead of “Settings -> Domain Management†…一個建議,我相信你意味著仙,包括“設置-> ”的D NSM anagerÃ仙,香港特別行政區最大的,而不是仙,包括“設置- >”域名Ma nagementÃ仙,香港特別行政區最大的. . .
Otherwise, excellent information.否則,良好的信息。
Please edit (or delete) this comment after you edit you instructions.請修改(或刪除)此評論後,您編輯您的指示。
Thanks again.再次感謝。
March 4th, 2008 at 4:27 am 2008年3月4號在上午04點27
[...] Blogs [...]博客 http://www.crazyleafdesign.com/blog/check-if-mod_rewrite-is-activated-on-your-server/ http://www.jtpratt.com/2008/01/22/how-to-fix-htaccess-file-for-mod_rewrite-and-addhandler-on-godaddy.. http://www.jtpratt.com/2008/01/22/how-to-fix-htaccess-file-for-mod_rewrite-and-addhandler-on-godaddy .. . 。 http://pensae.com/2008/01/14/when-mod_rewrite-doesnt-work/ [...]
March 16th, 2008 at 12:34 pm 2008年3月16日在下午12時34分
I was wondering, what about build a niche store type sites?我想知道,如何建立一個利基商店類型的網站? Is there any way to put them on a subdomain without problems?是否有任何方式將它們放在一個子沒有問題嗎?
Pink Munoz’s last blog post.. 粉紅穆尼奧斯最後的博客帖子.. Depression Glass Patterns 抑鬱症玻璃模式
March 16th, 2008 at 12:35 pm 2008年3月16日在下午12時35分
is there a way to get bans sites to work like this?有一個方法可以禁止網站的工作呢?
erica Munoz’s last blog post.. 埃里卡穆尼奧斯最後的博客帖子.. Depression Glass Patterns 抑鬱症玻璃模式
March 21st, 2008 at 3:09 pm 08年3月21日在下午3時09分
When I did this I was able to get my BANS site to work…當我這樣做我可以讓我的網站,禁止工作...
May 4th, 2008 at 8:52 pm 2008年五月4日在下午8時52分
WOW!哇! Thanks!謝謝! This worked for me with Wordpress!這對我的工作與WordPress的!
May 22nd, 2008 at 2:30 pm 2008年5月22日下午2時30分
hi,嗨,
i tried this too, but it said the subdomain is not valid!我嘗試這一點,但它說,子是無效的! :( : (
any clue?任何線索?
July 1st, 2008 at 10:20 pm 2008年7月1日在下午10時20分
This was helpful to me.這是幫助我。 Very strange that setting up a wildcard could fix the mod_rewrite issue, but i’ll take it!非常奇怪的是,成立一個通配符可以修復mod_rewrite的問題,但我要它!
August 27th, 2008 at 12:23 pm 2008年8月27日在下午12點23分
thanks.謝謝。
this was so helpful, i’m putting a link back to you on my site.這是如此有用,我把一個鏈接回你在我的網站上。
ken縣
August 27th, 2008 at 12:25 pm 2008年8月27日在下午12時25分
@Ken - thanks! @肯-謝謝! That’s why I posted it, it was the instructions that “I” was missing when I had the same problem!這就是為什麼我發布,它是指示, “我”失踪當我有同樣的問題!![= ) ]](http://www.jtpratt.com/wp-includes/images/smilies/4.gif)