subdirectory index.php is not working

Question

I have setup wordpress in the root directory and at the same level I have some other directories e.g named “sq”.

Under sq there are subdirectories like first, second, … under each subdirectory there is index.php file.

Problem is when I am accessing http://example.com/sq/first it is giving me 404 page of root wordpress.

I tried index.html instead of index.php and that is working. So index.php is not woking and I need php not html.

I have tried all the possible google solutions of updating .htaccess but nothing is working for me. e.g I have tried this

# Include in the next line all folders to exclude
RewriteCond %{REQUEST_URI}  !(sq|folder2|folder3) [NC]
RewriteCond %{REQUEST_URI} !^/(sq|mydir/.*)$
RewriteBase /sq/

my complete .htaccess is as

# BEGIN WordPress
<IfModule mod_rewrite.c>
ErrorDocument 401 default
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]

# Include in the next line all folders to exclude
RewriteCond %{REQUEST_URI}  !(sq|folder2|folder3) [NC]
RewriteCond %{REQUEST_URI} !^/(sq|mydir/.*)$
RewriteBase /sq/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]


#----- START DAP -----
RewriteCond %{REQUEST_FILENAME} -f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} (.*)/wp-content/uploads/(.*) 
RewriteCond %{REQUEST_FILENAME} !(.*)(.php|.css|.js|.jpg|.gif|.png|.txt|.ico|.jpeg)$ 
RewriteRule (.*) /dap/client/website/dapclient.php?dapref=%{REQUEST_URI}&plug=wp&%{QUERY_STRING}  [L] 
#----- END DAP -----

</IfModule>

# END WordPress

Please help guys.

Thanks.

0
, , , Bhuvnesh Gupta 5 months 0 Answers 55 views 0

Leave an answer