Skip to main content

Editing .htaccess to use PHP inside of HTML?

Comments

9 comments

  • cPanelMichael
    [quote="TheXboxCloud, post: 1706392">Please respond with the proper code for Apache 2.5 (you will be a lifesaver).
    Hello :) cPanel does not offer Apache 2.5. Are you sure cPanel/WHM is installed on this system? Has your web hosting provider installed a custom version of Apache? Thank you.
    0
  • TheXboxCloud
    [quote="cPanelMichael, post: 1706592">Hello :) cPanel does not offer Apache 2.5. Are you sure cPanel/WHM is installed on this system? Has your web hosting provider installed a custom version of Apache? Thank you.
    My webhost is Godaddy, and I do have cpanel. There was a misunderstanding regarding the Apache version through a link I was given. Not sure the exact version but I'd love to see a full code example of how I should edit the .htaccess If possible, please provide me with the code needed. Also what file permission it needs to be on. Thank you very much cPanelMichael. [COLOR="silver">- - - Updated - - - [quote="cPanelMichael, post: 1706592">Hello :) cPanel does not offer Apache 2.5. Are you sure cPanel/WHM is installed on this system? Has your web hosting provider installed a custom version of Apache? Thank you.
    Go daddy does use cPanel. Though their version is custom to Godaddy. So it may use Apache 2.5 if you provide their custom setup with it.
    0
  • cPanelMichael
    The typical entries used in the .htaccess file are AddHandler application/x-httpd-php5 .html AddHandler application/x-httpd-php5 .htm
    You don't typically need to change permissions or ownership of files. What PHP handler (e.g. suPHP, DSO, FCGI) are you using? Thank you.
    0
  • TheXboxCloud
    [quote="cPanelMichael, post: 1707572">The typical entries used in the .htaccess file are AddHandler application/x-httpd-php5 .html AddHandler application/x-httpd-php5 .htm
    You don't typically need to change permissions or ownership of files. What PHP handler (e.g. suPHP, DSO, FCGI) are you using? Thank you.
    FCGI I believe is the handler. Like I said, I am using godaddy and their cpanel may actually use apache 2.5 According to you, even godaddy's custom panel doesn't use this. Though I just cannot explain the htaccess not taking effect with the code I do put in. The support directive on godaddy's link to help was as follows: httpd.apache.org/mod_fcgid/mod/mod_fcgid.html Making me assume it was really 2.5 It has been said, .htaccess is indeed enabled on the server. I have tried the RemoveHandler method as well and also AddHandler. Support claimed that AddHandler along with FCGIdWrapper was the one I should use. Still nothing. My guesses are either their custom cpanel really does use apache 2.5, the support guy was wrong, or the code he put in (AddHandler with FCGIdWrapper) were wrong or not complete. I really appreciate you helping me, I am a cpanel customer and I am fixing to get my own server hardware, so I intend to purchase cpanel directly from you in the future. Hopefully we'll find a solution to this.
    0
  • cPanelMichael
    I suggest consulting further with your hosting provider about this issue. Have them check to ensure the web page loads as expected after adding in those entries. Thank you.
    0
  • TheXboxCloud
    [quote="cPanelMichael, post: 1708402">I suggest consulting further with your hosting provider about this issue. Have them check to ensure the web page loads as expected after adding in those entries. Thank you.
    No that doesn't work and I need your help. [COLOR="silver">- - - Updated - - - They use apache 2.4.9 Now you can help me.
    0
  • cPanelMichael
    There is not much we can do to help further without root access to the server. You are welcome to have your hosting provider submit a ticket with us if they are not sure what the issue is. Thank you.
    0
  • rjalcivar
    TheXboxCloud excuse me, but you got an answer or a solution to your problem? I have the same problem and I can't fix it. can you help me? thanks
    0
  • cPanelMichael
    Have you consulted with your web hosting provider to see if they are able to troubleshoot the issue further? Thank you.
    0

Please sign in to leave a comment.