How I Fixed Drupal Clean URL’s Using GoDaddy Hosting我是怎樣固定Drupal清潔網址的使用GoDaddy託管
6,308 views - 6308意見者:管Posted in: 張貼於:
6,308 views 6308意見
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 use Wordpress for nearly all of my web sites, but I still own two Drupal sites. As I posted previously, I moved all my sites to GoDaddy within the last month, and these two sites were no exception. I started up a premium account, and had a main domain, and then in their control panel I mapped domain names to sub-folders. This is very handy for me in ftp, all of my web sites are available to me in one place, separated only by folder.我使用WordPress的幾乎所有的網站,但我仍然擁有兩個Drupal sites.à ,一個正如我以前公佈,我搬到了我所有的網站GoDaddy在過去的一個月,這兩個網站沒有exception.à ,一個我開始了一個溢價帳,並且一個主要的域,然後在其控制面板,我對應的域名分folders.à ,一個這是非常方便的FTP我,我所有的網站都提供給我一個地方,只有分開的文件夾中。
At first my Drupal sites appeared to work fine when I migrated them. However, it was only the home page. Any link you clicked on came up server error - both Drupal sites. I knew GoDaddy allowed Drupal, they have an autoinstall available for it in Metropolis. I setup a test dir and installed Drupal there using the automated tool. It had the same problem. Now I knew that it wasn’t my site, it was a GoDaddy problem. I called GoDaddy tech support and they raised an elevated ticket to the an advanced tech. I explained the problem to him, and told him I thought it had something to do with the .htaccess files or server setup. His response was that they “don’t debug code”.首先我的Drupal網站的工作似乎罰款當我移居them.à ,一個然而,這只是家庭page.Ã的任何鏈接,您點擊了服務器錯誤-既D rupals ites.Ã,一個我知道允許G oDaddy ,網站他們有AutoInstall是否可用於在Metropolis.à ,一個設置一個測試目錄和安裝使用Drupal有自動tool.à ,一個它有同樣的problem.à ,一個現在我知道這不是我的網站,這是一個GoDaddy problem.à ,一個我叫GoDaddy技術支持,他們提出了一個提高門票的先進tech.à ,一個我解釋這個問題給他,並告訴他,我認為它可能與。 htaccess文件或服務器setup.à ,一個他的反應是,他們“不調試代碼” 。
I was going to respond when I figured out what the problem was. My main domain had it’s own (wordpress) .htaccess file. I thought at first that was the problem. Then I remembered, when you have a shared host with domains mapped to sub-directories it’s setup in the apache httpd.conf file I believe (hardcoded). Essentially, when a request comes in to that IP address from a domain name, the web server knows which folder to forward it too. (Without some customization) I don’t think the web server could handle that redirect, on top of an .htaccess file rewriting the URL’s to ‘clean url’s’ (permalinks).我要回應當我想出什麼問題was.à ,我的主要領域有它自己的( WordPress的) 。 htaccess file.à ,一個我覺得首先這是problem.à ,當時我記得,當你有一個共享主機域名映射到子目錄它安裝在阿帕奇httpd.conf文件我相信(硬編碼) 。一個,一個本質,當一個請求是在該IP地址的域名, Web服務器知道哪些文件夾,轉發too.à ,一個(如果沒有某種定制)我不認為Web服務器可以處理重定向,再加上一個。 htaccess文件的URL重寫的,以'乾淨網址的' (永久) 。
So - long story short, IF you have an GoDaddy hosting account, and IF you have multiple domain names (and you’re planning on using clean URL’s), you can only do it from the root of your account (or main domain name) only. I did fix the problem, but ended up buying two additional basic hosting accounts ($3.99 per month) for each domain, and then both sites worked flawlessly.所以-長話短說,如果您有G oDaddy託管帳戶,如果您有多個域名(和您計劃使用潔淨網址的) ,你只能做它的根源,您的帳戶(或主域名稱) only.à ,一個我沒有解決此問題,但最終購買兩個額外的基本代管帳戶( 3.99美元每月) ,每個網域,然後這兩個網站的工作完美無缺。
If you have some other fix (or comment) related to hosting Drupal or Wordpress sites at GoDaddy - please comment now below!如果您有其他一些修正(或評論)有關託管Drupal或WordPress的網站GoDaddy -現在,請評論以下!
























September 28th, 2007 at 7:18 am 07年9月28日在上午07點18分
hi jtpratt!高科技jtpratt !
i faced a similar problem.字母i面臨著類似的問題。 But i managed to fix this by creating a new .htaccess file in the (subfolder/root) of my 2nd domain.不過,我設法解決這一問題,創造新的。 htaccess文件中(子/根)我國第2次的網域。 This is the code for the modified .htaccess file這是代碼的修改。 htaccess文件
Have fun!玩得開心! no more dual purchases from godaddy :)沒有更多的雙購買godaddy : )
AmitG
Email:電子郵件: rapidsynopsis@gmail.com
Website:網址: http://www.rapidsynopsis.com
_________________________________________________
# #
# Apache/PHP/Drupal settings: #的Apache / PHP的/ Drupal設置:
# #
# Protect files and directories from prying eyes. #保護文件和目錄由窺探。
Order deny,allow為了否認,允許
Deny from all拒絕所有
# Set some options. #設置一些選項。
Options -Indexes選項-指標
Options +FollowSymLinks選項+ FollowSymLinks
# Customized error messages. #定制的錯誤信息。
ErrorDocument 404 /index.php ErrorDocument 404 /的index.php
# Set the default handler. #設置默認的處理程序。
DirectoryIndex index.php DirectoryIndex的index.php
# Override PHP settings. #覆蓋PHP的設置。 More in sites/default/settings.php更多的網站/預設/ settings.php
# but the following cannot be changed at runtime. #以下,但不能改變在運行時。
# PHP 4, Apache 1 # PHP 4中,阿帕奇一日
php_value magic_quotes_gpc 0 php_value magic_quotes_gpc的0
php_value register_globals 0 php_value register_globals的0
php_value session.auto_start 0 php_value session.auto_start 0
# PHP 4, Apache 2 # PHP 4中,阿帕奇2
php_value magic_quotes_gpc 0 php_value magic_quotes_gpc的0
php_value register_globals 0 php_value register_globals的0
php_value session.auto_start 0 php_value session.auto_start 0
# PHP 5, Apache 1 and 2 # PHP 5中, Apache的第1和第2
php_value magic_quotes_gpc 0 php_value magic_quotes_gpc的0
php_value register_globals 0 php_value register_globals的0
php_value session.auto_start 0 php_value session.auto_start 0
# Reduce the time dynamically generated pages are cache-able. #所需的時間縮短動態產生的網頁緩存能。
ExpiresByType text/html A1 ExpiresByType文字/的HTML格A1
# Various rewrite rules. #各種重寫規則。
RewriteEngine on RewriteEngine上
# If your site can be accessed both with and without the prefix #如果您的網站可同時和無前綴 http://www . 。
# you can use one of the following settings to force user to use only one option: #您可以使用下列其中一個設置,迫使用戶只能使用一個選項:
# #
# If you want the site to be accessed WITH the #如果您想要的網站的訪問 http://www . 。 only, adapt and uncomment the following:只,調整和取消對以下內容:
# RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC] # RewriteCond % ( HTTP_HOST ) ! ^的www \ 。例如\ 。 com $ [數控]
# RewriteRule .* # RewriteRule .* http://www.example.com/ [L,R=301] [左,右= 301 ]
# #
# If you want the site to be accessed only WITHOUT the #如果你想要的網站進行訪問的唯一無 http://www . 。 , adapt and uncomment the following: ,調整和取消對以下內容:
# RewriteCond %{HTTP_HOST} !^example\.com$ [NC] # RewriteCond % ( HTTP_HOST ) ! ^例如\ 。 com $ [數控]
# RewriteRule .* # RewriteRule .* http://example.com/ [L,R=301] [左,右= 301 ]
# Modify the RewriteBase if you are using Drupal in a subdirectory and #修改RewriteBase如果您使用的是Drupal子目錄和
# the rewrite rules are not working properly. #的重寫規則是無法正常運作。
RewriteBase / RewriteBase /
# Rewrite old-style URLs of the form ‘node.php?id=x’. #重寫舊式網址的形式' node.php ?編號=坐標。
#RewriteCond %{REQUEST_FILENAME} !-f # RewriteCond % ( REQUEST_FILENAME ) !口
#RewriteCond %{REQUEST_FILENAME} !-d # RewriteCond % ( REQUEST_FILENAME ) !一d
#RewriteCond %{QUERY_STRING} ^id=([^&]+)$ # RewriteCond % ( QUERY_STRING ) ^編號=([^&]+)$
#RewriteRule node.php index.php?q=node/view/%1 [L] # RewriteRule node.php的index.php ?為Q =節點/查看/ % 1 [ L ]條
# Rewrite old-style URLs of the form ‘module.php?mod=x’. #重寫舊式網址的形式' module.php ?改進型=坐標。
#RewriteCond %{REQUEST_FILENAME} !-f # RewriteCond % ( REQUEST_FILENAME ) !口
#RewriteCond %{REQUEST_FILENAME} !-d # RewriteCond % ( REQUEST_FILENAME ) !一d
#RewriteCond %{QUERY_STRING} ^mod=([^&]+)$ # RewriteCond % ( QUERY_STRING ) ^改進型=([^&]+)$
#RewriteRule module.php index.php?q=%1 [L] # RewriteRule module.php的index.php ?為Q = % 1 [ L ]條
# Rewrite rules for static page caching provided by the Boost module #重寫規則的靜態頁面緩存提供了升壓模塊
# BOOST START #升壓階段
AddCharset utf-8 .html AddCharset的UTF - 8 。的HTML
RewriteCond %{REQUEST_URI} !^/cache RewriteCond % ( REQUEST_URI ) ! ^ /緩存
RewriteCond %{REQUEST_URI} !^/user/login RewriteCond % ( REQUEST_URI ) ! ^ /用戶/登錄
RewriteCond %{REQUEST_URI} !^/admin RewriteCond % ( REQUEST_URI ) ! ^ /管理員
RewriteCond %{HTTP_COOKIE} !DRUPAL_UID RewriteCond % ( HTTP_COOKIE ) ! DRUPAL_UID
RewriteCond %{REQUEST_METHOD} ^GET$ RewriteCond % ( REQUEST_METHOD ) ^得到$
RewriteCond %{QUERY_STRING} ^$ RewriteCond % ( QUERY_STRING ) ^ $
RewriteCond %{DOCUMENT_ROOT}/cache/%{SERVER_NAME}/0/%{REQUEST_URI} -d RewriteCond % ( DOCUMENT_ROOT ) /緩存/ % (服務器) / 0 / % ( REQUEST_URI )一d
RewriteCond %{DOCUMENT_ROOT}/cache/%{SERVER_NAME}/0/%{REQUEST_URI}/index.html -f RewriteCond % ( DOCUMENT_ROOT ) /緩存/ % (服務器) / 0 / % ( REQUEST_URI ) / index.html的口
RewriteRule ^(.*)$ cache/%{SERVER_NAME}/0/$1/index.html [L] RewriteRule ^(.*)$緩存/ % (服務器) / 0 / $ 1/index.html [ L ]條
RewriteCond %{REQUEST_URI} !^/cache RewriteCond % ( REQUEST_URI ) ! ^ /緩存
RewriteCond %{REQUEST_URI} !^/user/login RewriteCond % ( REQUEST_URI ) ! ^ /用戶/登錄
RewriteCond %{REQUEST_URI} !^/admin RewriteCond % ( REQUEST_URI ) ! ^ /管理員
RewriteCond %{HTTP_COOKIE} !DRUPAL_UID RewriteCond % ( HTTP_COOKIE ) ! DRUPAL_UID
RewriteCond %{REQUEST_METHOD} ^GET$ RewriteCond % ( REQUEST_METHOD ) ^得到$
RewriteCond %{QUERY_STRING} ^$ RewriteCond % ( QUERY_STRING ) ^ $
RewriteCond %{DOCUMENT_ROOT}/cache/%{SERVER_NAME}/0/%{REQUEST_URI}.html -f RewriteCond % ( DOCUMENT_ROOT ) /緩存/ % (服務器) / 0 / % ( REQUEST_URI ) 。的HTML口
RewriteRule ^(.*)$ cache/%{SERVER_NAME}/0/$1.html [L] RewriteRule ^(.*)$緩存/ % (服務器) / 0 / $ 1.html [ L ]條
# BOOST END #升壓完
# Rewrite current-style URLs of the form ‘index.php?q=x’. #重寫當前風格網址的形式'的index.php ?為Q =坐標。
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond % ( REQUEST_FILENAME ) !口
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond % ( REQUEST_FILENAME ) !一d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] RewriteRule ^(.*)$的index.php ?為Q = $ 1 [ L時, QSA ]
# $Id: boosted.txt,v 1.4 2006/12/05 10:39:19 arto Exp $ # $編號: boosted.txt電壓1.4 2006/12/05 10時39分十九秒arto進出口$
_________________________________________________
March 16th, 2008 at 7:37 pm 2008年3月16日在下午7點37分
I couldn’t get the code above for .htaccess to work, but using rewritebase / seems to do the trick — except that now my images don’t show correctly.我無法讓上面的代碼的。 htaccess的工作,但使用rewritebase /似乎這樣的伎倆-但現在我的圖像不顯示正確。
Anyone know anything about the images bonking up now?任何人都一無所知的圖像bonking了嗎? They’re put in by FCKeditor in the /files/ directory.他們是在由FCKeditor在/文件/目錄。
March 16th, 2008 at 7:39 pm 2008年3月16日在下午7時39分
Mind you, with just rewritebase / - trying to view the site directly from the original location:記住你,只有rewritebase / -嘗試檢視該網站直接從原來的位置: http://www.example.com/site1 will pop you back into the “main” godaddy site.會彈出你回到“主要” godaddy網站。 but its reachable by the main URL except for images.但其到達的主要網址除外圖像。 :/ : /
August 17th, 2008 at 2:48 pm 2008年八月十七日在下午2時48分
Ugh, I wish I had seen this tip before I uninstalled Drupal and put Wordpress on my new site.啊呀,我想我已經看到這個提示之前,我卸載Drupal和WordPress的把我的新網站。
Beside the clean url issue, I was also having real trouble setting up a drupal forum.除了乾淨的網址問題,我也有真正的麻煩建立一個drupal論壇。 Do you know of any good tutorial sites for drupal?你知道的任何良好的教學場所drupal ?
Dana Vienass last blog post..達納Vienass最後的博客帖子.. The Whole Truth About Diet Pills整個真相的減肥藥
August 17th, 2008 at 2:59 pm 2008年八月十七日在下午2時59分
@Dana - no I don’t, I used Drupal exclusively on all my sites for 2 years and then changed them all over to Wordpress for that very reason. @達納-沒有我不,我用D rupal完全我所有的網站為2年,然後改變他們都到W ordPress的這個原因。 Compare to Wordpress, there are only (maybe) 5-10% as much themes, plugins, and support for Drupal. WordPress的比較中,只有(也許) 5-10 %多的主題,插件,並支持Drupal 。 I hate Drupal - I will never go back…我恨Drupal -我永遠不會回去. ..
October 1st, 2008 at 8:14 am 2008年一十○月一日在上午08點14分
@Dana - If you’re still having a lot of problems with the Drupal forums and haven’t stuck to Wordpress I’d be happy to help you. @達納-如果你仍然有很多問題與D rupal論壇上,並沒有堅持W ordPress的我很樂意為您提供幫助。