Announcement

Collapse
No announcement yet.

Editing htaccess file problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Editing htaccess file problem

    I want to add text to my htaccess file for keyword tracking purposes (the keyword tracking software I am using does not work for .html pages, only .php, so I'm told I need to add the following code:

    AddType application/x-httpd-php .html
    AddHandler x-httpd-php .html

    This is not in my main domain, but in various add on domains, so I created an htaccess file in each add on domain folder & added the above text.

    I did this on one of my add on domains (www.ovariancystshealed.info) with no problem, but when I tried it on another, then something strange happened. When I tried to open the home page (www.biggerbetterman.com) it immediately tries to download a file called biggerbetterman_com (which doesn't exist) & it is not possible to open the page.

    I have now deleted the htaccess file, but this has not solved the problem.

    How do I stop this happening, & why did it corrupt one domain but not the other?

    Any help really appreciated.

    Val

  • #2
    Re: Editing htaccess file problem

    Hi Val,

    I can not really help you with this question, but I was wondering....

    If I understand you correct, the keyword tracking software works for .php pages...so why not you just save your pages as php instead of .html?

    I imagine you would avoid a lot of headaches.

    Open the page properties ==> general tab ==> change file extension to "php"

    Travlinman

    AguycanBeach.com
    Aguycanbeachhostel
    Comunidad Aguycan Beach

    A great must do for all beginners by Lincslady

    Comment


    • #3
      Re: Editing htaccess file problem

      Hi Travlinman,

      I didn't know that I could do this. I've been pulling my hair out on this one, & that definitely would solve my problem, so thank you, thank you, thank you!

      Val

      Comment


      • #4
        Re: Editing htaccess file problem

        Just as a follow up to this, if I change my home page from index.html to index.php, & someone has saved it in their favorites when it was .html, will the link still work when I change it to .php? And are there any other problems with changing an already established web site from html to php that I might run into?

        Thanks again for your help,

        Val

        Comment


        • #5
          Re: Editing htaccess file problem

          As long as they have saved it as your dot com it will be fine

          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


          • #6
            Re: Editing htaccess file problem

            Thanks Karen.

            Val

            Comment


            • #7
              Re: Editing htaccess file problem

              Well this line of the .htaccess file tells the server to execute all html files as a .php

              AddHandler x-httpd-php .html

              Which is meant to prevent you from having to manually change all of your pages to .php and updating all links, as well as bookmarks.

              Have you tried to see if only putting the htaccess file in your public_html works on all your domains? I know that all child directories will load its parent directories htaccess files, I just don't know if the server will take into effect addon domains.

              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

              Working...
              X