When you try to create a redirect through cPanel, sometimes, you may come across an error message similar to the one below.
Apache detected an error in the Rewrite config. Syntax error on line x of /home/user/public_html/.htaccess.xxxxxxxxxxxxxxxxxxxxxxxxxxx: Invalid command ‘suPHP_ConfigPath’, perhaps misspelled or defined by a module not included in the server configuration Please try again.
This error is caused by using a custom php.ini file.
The solution:
- Edit the .htaccess file at /home/user/public_html (where user is your cPanel username)
- Open the .htaccess file and search for the following line and comment it out
suPHP_ConfigPath /home/user/www (where user is your cPanel username)
Add a # to the front of the line to comment it out
# suPHP_ConfigPath /home/user/www (where user is your cPanel username)
- Save the .htaccess file and apply the redirects within your cPanel account
- Once the redirects are set uncomment that line and save the .htaccess again to re-apply your php.ini file
|