Sultan Mahmud
Sultan Mahmud

Reputation: 43

Different project on Wordpress sub directory

I am trying to develope a project on a sub directory of my web root where WordPress is installed. Somehow it keeps showing 404 error page. Let me explain -

http://www.mysite.com - [Web root directory/WordPress site installed]

.htaccess of this directory:

# 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

http://www.mysite.com/crm/ - [New directory 'crm' where I stored my CodeIgniter project/Secured pages]

.htaccess of this crm directory: (this is for Codeigniter project)

RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

Whenever I try to access the second link, it shows 404 error. Please help me to solve this issue.

** If I use normal html file, it works, but for secured page, it does not work.

Upvotes: 3

Views: 315

Answers (1)

anubhava
anubhava

Reputation: 785008

You need to change your /crm/.htaccess as:

RewriteEngine on
RewriteBase /crm/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

And DocumentRoot/.htaccess as this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^crm(/|$) - [NC,L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

Upvotes: 2

Related Questions