The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

.htaccess file

Discussion in 'Security' started by tank, Apr 12, 2011.

  1. tank

    tank Well-Known Member

    Joined:
    Apr 12, 2011
    Messages:
    236
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Chicago, IL
    cPanel Access Level:
    Root Administrator
    I am very new to cpanel and need some resolving some of my issues. Specifically i am addressing the ability for the .htaccess file to run php code. Should I have this disabled. Right now in my file i see.

    Code:
    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
    Current setting for PHP is suphp running php 5 and apache sEXEC is on.

    what does this exactly mean to me. I know it ignores those files but what does that mean for the server setup. Is it safe to have a .htaccess file to be able to run php? What would you recommend and why?

    Thanks for the help,
    Tank
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    This is not PHP code in the .htaccess file. It's Apache directives and regex. PHP code cannot run in .htaccess files, but Apache directives can be placed into the .htaccess file.
     
  3. tank

    tank Well-Known Member

    Joined:
    Apr 12, 2011
    Messages:
    236
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Chicago, IL
    cPanel Access Level:
    Root Administrator
    Thanks you for the reply. So when would i want to be able to run PHP code in the .htaccess file. Do other hosting providers allow their customers to use PHP code.
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    You cannot run PHP code in the .htaccess file. It is for Apache directives.
     
  5. tank

    tank Well-Known Member

    Joined:
    Apr 12, 2011
    Messages:
    236
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Chicago, IL
    cPanel Access Level:
    Root Administrator
    Thanks. for the help
     
Loading...

Share This Page