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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Wordpress .htaccess error + api cPanel

Discussion in 'cPanel Developers' started by Ricardo Lobo, Mar 29, 2018.

  1. Ricardo Lobo

    Ricardo Lobo Member

    Oct 11, 2016
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Hello everyone, I have the following scenario:

    1 - A site in wordpress in the root of the directory, which has a standard wordpress .htaccess.

    2 - An application running in the subfolder "panel", which has a .htaccess and works with the cpanel API to create subdomains in that same folder.

    When the cPanel API is triggered, the wordpress .htaccess file does not let the API enter the subfolder "panel" and create the subdomain. When I remove the .htaccess file from wordpress from the root, the API works 100%.

    Can someone help me? Follow the htacces.

    .htaccess wordpress

    #BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    # END WordPress
    .htaccess subfolder "panel"
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-l
    RewriteBase /painel/
    RewriteRule ^(.+)$ index.php?path=$1 [QSA,L]
    # Controle dos ícones apos efetuar o cadastro
    <IfModule mod_headers.c>   
    Header add Access-Control-Allow-Origin "*"
    # Fim controle dos ícones apos efetuar o cadastro
    #Força a utilizar Cache-Control e Expires header
    <IfModule mod_headers.c>
      Header unset ETag

Share This Page