Results 1 to 8 of 8

Thread: 500 Internal Server Errors any time I edit .htaccess
      
   

  1. #1
    susan-at-tnc is offline Private
    Join Date
    May 2009
    Posts
    4

    Default 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

  2. #2
    Karen Mac's Avatar
    Karen Mac is offline General
    Join Date
    Apr 2006
    Location
    X marks the spot
    Posts
    8,337

    Default 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)



  3. #3
    Watdaflip's Avatar
    Watdaflip is offline Major General
    Join Date
    Sep 2005
    Location
    Cincinnati, Ohio
    Posts
    2,118

    Default 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

  4. #4
    susan-at-tnc is offline Private
    Join Date
    May 2009
    Posts
    4

    Default 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

  5. #5
    Karen Mac's Avatar
    Karen Mac is offline General
    Join Date
    Apr 2006
    Location
    X marks the spot
    Posts
    8,337

    Default 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)



  6. #6
    Watdaflip's Avatar
    Watdaflip is offline Major General
    Join Date
    Sep 2005
    Location
    Cincinnati, Ohio
    Posts
    2,118

    Default 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

  7. #7
    susan-at-tnc is offline Private
    Join Date
    May 2009
    Posts
    4

    Default 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.

  8. #8
    susan-at-tnc is offline Private
    Join Date
    May 2009
    Posts
    4

    Default 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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49