500 Internal Server Errors any time I edit .htaccess

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • susan-at-tnc
    Private

    • May 2009
    • 4

    500 Internal Server Errors any time I edit .htaccess

    When we bought a new domain name, mcatoolkit.org, it was created by VH as an add-on domain to the original name of our hosting account, leaseown.org. I have now launched the site mcatoolkit.org, and rewritten leaseown.org's index page to open the new site's (no meta or htaccess rules).

    Now I want to hand-code the .htaccess file at the top level of public_html to redirect specific pages internal to the leaseown.org site to other pages in mcatoolkit.org.

    I was unsuccessful when I tried to redirect, say, /Home/About_Us.html to http://www.mcatoolkit.org/Home/About_Us.html. I would immediately get 500 Internal Server Errors when trying to access either the old site or the new site.

    Then I tried one single file in .htaccess, which did not break, but also did not work...nothing was redirected UNTIL after VH upgraded my CPanel software. Now (a) the rule shows up in CPanel, and (b) the .htaccess file, which consists only of:
    Redirect 301 /Resources/PMCA_Workshop.html http://www.mcatoolkit.org/Resources/...s_PMCA_08.html
    works.

    But every time I try to add another line to the .htaccess file, in the same format, I get the 500 error.

    When I try to add the rule via CPanel, I get this error from the server:

    "Apache detected an error in the Rewrite config.
    Syntax error on line 3 of /home/vvisucax/public_html/.htaccess._K5LK2JL5JqyBgX78yWrTU5b_j8wyxCd:
    Redirect takes two or three arguments, an optional status, then document to be redirected and destination URL
    Please try again"

    Of course, I have no idea what CPanel is doing and I would rather just write this .htaccess file and be done with it! I will have many lines in it. Please help. Thanks.

    Domains: leaseown.org, mcatoolkit.org
    Account ID: vvisucax
  • Karen Mac
    General

    • Apr 2006
    • 8332

    #2
    Re: 500 Internal Server Errors any time I edit .htaccess

    redirect from the folders root instead of the websites root and see if that solves the issue..

    Also dont use HOME/About us.. unless HOME is a folder or directory of public_html

    Karen

    VodaHost

    Your Website People!
    1-302-283-3777 North America / International
    02036089024 / United Kingdom
    291916438 / Australia

    ------------------------

    Top 3 Best Sellers

    Web Hosting - Unlimited disk space & bandwidth.

    Reseller Hosting - Start your own web hosting business.

    Search Engine & Directory Submission - 300 directories + (Google,Yahoo,Bing)


    Comment

    • Watdaflip
      Major General

      • Sep 2005
      • 2116

      #3
      Re: 500 Internal Server Errors any time I edit .htaccess

      What is currently in the .htaccess file, and what code are you trying to add

      Register/Login Script
      Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

      Comment

      • susan-at-tnc
        Private

        • May 2009
        • 4

        #4
        Re: 500 Internal Server Errors any time I edit .htaccess

        Karen Mac: (a) there is a directory named Home at the top level of public_html. (b) I tried putting a separate .htaccess file into that directory. Its contents are:
        Redirect 301 /Contact_Us.html http://www.mcatoolkit.org/Home/Contact_Us.html
        Redirect 301 /Help.html http://www.mcatoolkit.org/Home/Help.html
        Redirect 301 /About_Us.html http://www.mcatoolkit.org/Home/About_Us.html
        Redirect 301 /Mailing_List.html http://www.mcatoolkit.org/Home/Mailing_List.html

        and so on. I still get a server error when trying to go to any of the pages in that directory. But it doesn't bring down the entire site.

        Watdaflip: see above. Obviously, in the .htaccess file at the top level, the above redirect commands would read
        Redirect 301 /directoryname/filename.html http://www.mcatoolkit.org/Home/Mailing_List.html

        Comment

        • Karen Mac
          General

          • Apr 2006
          • 8332

          #5
          Re: 500 Internal Server Errors any time I edit .htaccess

          yes.. but you dont USE home. thats why you are having problems.. htacess goes in your PUBLIC_HTML only.. so dont use it.. you cant direct that part of the server.

          Karen

          VodaHost

          Your Website People!
          1-302-283-3777 North America / International
          02036089024 / United Kingdom
          291916438 / Australia

          ------------------------

          Top 3 Best Sellers

          Web Hosting - Unlimited disk space & bandwidth.

          Reseller Hosting - Start your own web hosting business.

          Search Engine & Directory Submission - 300 directories + (Google,Yahoo,Bing)


          Comment

          • Watdaflip
            Major General

            • Sep 2005
            • 2116

            #6
            Re: 500 Internal Server Errors any time I edit .htaccess

            If you are just trying to redirect every page from the old domain to the new domain, you can just use this code (note: all the page names would have to stay exactly the same)

            Code:
            RewriteEngine On
            RewriteRule ^(.*)$ http://www.mcatoolkit.org/$1 [R=301,L]
            edit:
            fixed code box.. forgot the / in [/code]

            Register/Login Script
            Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

            Comment

            • susan-at-tnc
              Private

              • May 2009
              • 4

              #7
              Re: 500 Internal Server Errors any time I edit .htaccess

              Karen, I'm sorry but I don't understand you. Forget about the subdir called "Home". (I *do* "use* my directory called "Home" in both leaseown.org and mcatoolkit.org.) I have tried to redirect files in a subdir called "Resources", a subdir called "Step_1", and so on. *All these subdirs are in my Public_html folder...I am not trying to use any other part of the server!

              (a) if I put the .htaccess file in Public_html, the topic of my original message in this thread, I cannot add any lines beyond the first one which (as I said) started working correctly after our CPanel was upgraded.
              (b) if I put an .htaccess file in Public_html/Step_1/ with a few lines redirecting files, none of the files in that directory work--I get server errors.

              Comment

              • susan-at-tnc
                Private

                • May 2009
                • 4

                #8
                Re: 500 Internal Server Errors any time I edit .htaccess

                Watdaflip: thank you but I know that, and from the details of my messages--including the very first one-- you would see that not all the subfolders nor the html files within them are named the same.

                Comment

                Working...
                X