Jump to content
Sign in to follow this  
Boojum

Hotlink Protection, .htaccess Conflict?

Recommended Posts

When I tried to enable Hotlink Protection through CPanel, I got this error:

 

"Hotlink Protection

 

There was an error while enabling hotlink protection. Show Details

 

Apache detected an error in the Rewrite config.

 

Syntax error on line 2 of /home/squortc/public_html/.htaccess.wPvgA9KbyWMvOKBOc2mrwl_EUPM8ncKo:

Invalid command 'suPHP_ConfigPath', perhaps misspelled or defined by a module not included in the server configuration

 

Please try again."

 

(Note: the "Show Details" link doesn't work.)

 

Now, the line in question was inserted in my .htaccess file by an admin to enable PHP includes without compromising security, and I hesitate to tamper with it.

 

What do I need to reset to correct this conflict?

Share this post


Link to post
Share on other sites

I'll do that.

 

Thanks, Thomas.

Share this post


Link to post
Share on other sites

Hi Boojum,

 

Thank you for taking time to contact TCH to explain this issues that have occurred recently. I have resolved this issue and updated your ticket.

 

The issue can be resolved as follows.

 

1) Open the .htaccess file and search for the following line and comment it out.

 

suPHP_ConfigPath /home/username

 

The above line is added if you have a custom php.ini file

 

You can comment out that line by adding a '#' to its beginning as follows.

 

#suPHP_ConfigPath /home/username

 

2) Save the .htaccess file and try to enable Hotlink protection through cPanel once again and it will be successful.

 

3) Once the redirects are set, do not forget to revert the changes in .htaccess file. Uncomment that line and save the .htaccess again.

Share this post


Link to post
Share on other sites

If you have a custom php.ini file in the domain and you want the PHP directives to propagate to all sub folder, this can be achieved by a better method as follows

 

You can place your php.ini file in your Home Directory (/home/username/) yourself and then add this code to your primary .htaccess (/home/username/public_html/.htaccess). Be sure to replace "username" with your actual cPanel user name

 

suPHP_ConfigPath /home/username

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...