Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wordpress Htaccess - stop subdirectory auto redirecting to root index

I'm trying to make a subdirectory on wordpress

http://wpsite.com/codeigniter, http://wpsite.com/someothersubdir

But when I go to that url, it always redirects back to the wordpress site with the "page not found"

Here is the wordpress root htaccess file

# -FrontPage-
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>

# 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

How can I make sub directories separate from wordpress? Thank you

like image 357
Daniel Li Avatar asked Dec 07 '25 03:12

Daniel Li


1 Answers

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/codeigniter/
RewriteCond %{REQUEST_URI} !^/someothersubdir/
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
like image 173
rob006 Avatar answered Dec 08 '25 16:12

rob006



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!