Free Checking for Bloggers - Sign up in 5 Minutes! 免费检查的Blogger -注册5分钟!
Powered by MaxBlogPress 本站由MaxBlogPress

我是怎样固定Drupal清洁网址的使用GoDaddy主机| JTPRATT的博客错误
JTPratt的博客错误





Home » How I Fixed Drupal Clean URL’s Using GoDaddy Hosting »我如何固定Drupal清洁网址的使用GoDaddy托管



Posted in: 张贴于:

博客安装类形象drupal类形象虚拟主机类形象
5,561 views 5561意见


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 -现在,请评论以下!


6 Responses to “How I Fixed Drupal Clean URL’s Using GoDaddy Hosting” 6日回应“我是怎样固定Drupal清洁网址的使用GoDaddy托管”

  1. AmitG AmitG Has the following to say...有下列说...

    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进出口$
    _________________________________________________

  2. krikette krikette Has the following to say...有下列说...

    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在/文件/目录。

    = )研究

  3. krikette krikette Has the following to say...有下列说...

    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.但其到达的主要网址除外图像。 :/ : /

  4. Dana Vienas 达纳Vienas Has the following to say...有下列说...

    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整个真相的减肥药

  5. admin 管理员 Has the following to say...有下列说...

    @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 -我永远不会回去. ..

  6. Krikette Krikette Has the following to say...有下列说...

    @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的我很乐意为您提供帮助。

Question or Comment??问题或意见? ? Spill it Now...溢油现在...

跳跃的喜悦以上的评论!

We Reward Comments!我们奖励的意见!


We dofollow links, and get your latest blog post as a byline under every new comment from the "CommentLuv" plugin!我们dofollow联系,并获得最新的博客帖子的署名下的每一个新的评论从“ CommentLuv ”插件! Top commenters for every month are listed on every page of this site in a sidebar widget linked back to your URL!顶端commenters每个月列出的每个网页上本网站的联系栏部件回到您的网址! We would like to reward you for becoming part of our community!我们要奖励你成为我们的社会! Your comment is valuable not only to us, but also all the other readers of this blog!您的评论是有价值的,不仅给我们,而且所有的其他读者的博客!


Click to add smilies to your post! 按一下以新增的笑脸到您的帖子! == [ ]^ = (= ( (= ( |= )研究= | 8= 0= ) 〜= 00= (= ; ;= ) ]= ; ; ;