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!

Wordpress .htaccess error + api cPanel

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

  1. Ricardo Lobo

    Ricardo Lobo Member

    Joined:
    Oct 11, 2016
    Messages:
    12
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Brazil
    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.

    Problem:
    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

    Code:
    #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]
    </IfModule>
    
    # END WordPress
    .htaccess subfolder "panel"
    Code:
    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 "*"
    </IfModule>
    # Fim controle dos ícones apos efetuar o cadastro
    
    
    #Força a utilizar Cache-Control e Expires header
    <IfModule mod_headers.c>
      Header unset ETag
    </IfModule>
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,806
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
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