Title: Problem with subfolder getting 404&#8217;s
Last modified: November 23, 2020

---

# Problem with subfolder getting 404’s

 *  [xmasex](https://wordpress.org/support/users/xmasex/)
 * (@xmasex)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/problem-with-subfolder-getting-404s/)
 * Hello,
 * I have openlitespeed on directadmin, I have a wordpress website on root, and 
   perfex crm on subfolder called portal.
 * I’m trying to enter the crm but getting 404’s, used to work fine, not sure what
   happened.
 * It only works when I remove wordpress code from htaccess only. Tried everything
   but not sure what is going on, any help please ?
 * Thanks in advance.
 *     ```
       # BEGIN LSCACHE
       # END LSCACHE
       # BEGIN NON_LSCACHE
       # END NON_LSCACHE
   
       # BEGIN rlrssslReallySimpleSSL rsssl_version[3.3.5]
       <IfModule mod_rewrite.c>
       RewriteEngine on
       RewriteCond %{HTTP:CF-Visitor} '"scheme":"http"'
       RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/
       RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
       </IfModule>
       # END rlrssslReallySimpleSSL
   
       # 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
   
       # Wordfence WAF
       <IfModule LiteSpeed>
       php_value auto_prepend_file '/home/admin/domains/marketingbab.com/public_html/wordfence-waf.php'
       </IfModule>
       <IfModule lsapi_module>
       php_value auto_prepend_file '/home/admin/domains/marketingbab.com/public_html/wordfence-waf.php'
       </IfModule>
       <Files ".user.ini">
       <IfModule mod_authz_core.c>
       Require all denied
       </IfModule>
       <IfModule !mod_authz_core.c>
       Order deny,allow
       Deny from all
       </IfModule>
       </Files>
       # END Wordfence WAF
   
       RewriteEngine on
       RewriteBase /portal/
       RewriteCond $1 !^(index\.php|resources|robots\.txt)
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
       AddDefaultCharset utf-8
       ```
   

Viewing 1 replies (of 1 total)

 *  Thread Starter [xmasex](https://wordpress.org/support/users/xmasex/)
 * (@xmasex)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/problem-with-subfolder-getting-404s/#post-13702801)
 * Anyone can help me out please ?

Viewing 1 replies (of 1 total)

The topic ‘Problem with subfolder getting 404’s’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [xmasex](https://wordpress.org/support/users/xmasex/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/problem-with-subfolder-getting-404s/#post-13702801)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
