Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Global .htaccess

Discussion in 'General Discussion' started by joaosavioli, Apr 3, 2019.

  1. joaosavioli

    joaosavioli Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    64
    Likes Received:
    11
    Trophy Points:
    58
    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
     
  2. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,469
    Likes Received:
    505
    Trophy Points:
    263
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    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?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. joaosavioli

    joaosavioli Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    64
    Likes Received:
    11
    Trophy Points:
    58
    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.
    [[email protected]]# 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
     
  4. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,469
    Likes Received:
    505
    Trophy Points:
    263
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    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?
    Code:
    grep AllowOverride /etc/apache2/conf/httpd.conf
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. joaosavioli

    joaosavioli Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    64
    Likes Received:
    11
    Trophy Points:
    58
    Hi @cPanelLauren , thank you for replying.

    suphp
    PHP5.6

    [[email protected]]# 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
     
  6. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,469
    Likes Received:
    505
    Trophy Points:
    263
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @joaosavioli

    Thanks for that, this looks pretty normal.

    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!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice