Skip to main content

Global .htaccess

Comments

5 comments

  • cPanelLauren
    Hi, I have a global .htaccess in /home/.htaccess, and it was working until today. Sudely the file don't work in global /home/ or local user /home/user/.htaccess. It works only in user public_html folder (/home/user/public_html/.htaccess). How can I make it works again in a global location? Thank you! Cheers, Joao

    Have you made any recent changes to the PHP configuration and is the .htaccess file present? If it is still present what are the permissions/ownership of it? Are there also separate .htaccess files newly added to the public_html directories of your sites?
    0
  • joaosavioli
    Hi Lauren, thank you for replying. I didn't make any change in apache/php on this server. The permission of global .htaccess is bellow. It was working until today. [root@lnx1]# ls -la /home/.htaccess -rw-r--r--. 1 root root 187 Mar 27 11:46 /home/.htaccess Yes. The websites have own .htaccess file (It was working togheter). I have another server with cpanel and global .htaccess doesn't working too. Do you have any ideia what happened? Thank you Joao
    0
  • cPanelLauren
    Hi @joaosavioli I'm not aware of any changes that have been made that would cause this to stop functioning as intended. What PHP handler and version are you running? What is the AllowOverride setting in the Apache configuration set to? grep AllowOverride /etc/apache2/conf/httpd.conf
    0
  • joaosavioli
    Hi @cPanelLauren, thank you for replying. suphp PHP5.6 [root@lnx1]# grep AllowOverride /etc/apache2/conf/httpd.conf AllowOverride All AllowOverride None AllowOverride All AllowOverride All AllowOverride All AllowOverride All I could fix my problem with a modsecurity rule, but global .htaccess is not working yet. I remember that I've changed last week default php from 5.5 to 5.6. Is this can be the cause of the problem? Thank you! Joao
    0
  • cPanelLauren
    Hi @joaosavioli Thanks for that, this looks pretty normal.
    I remember that I've changed last week default php from 5.5 to 5.6. Is this can be the cause of the problem?

    I can't see why it would but can you please open a ticket using the link in my signature? Once open please reply with the Ticket ID here so that we can update this thread with the resolution once the ticket is resolved. Thanks!
    0

Please sign in to leave a comment.