Willie Doc Wright
Willie Doc Wright

Reputation: 153

Wordpress Multisite Htaccess Overwrite

I am trying to make a basic folder rewrite that over rides Wordpresses default htaccess.

I need a folder located at domain.com/community/sso/index.php to force resolve as domain.com/community/sso

This is what I recently tried:

Options -MultiViews
RewriteEngine On

RewriteRule ^community  - [L]


RewriteBase /
RewriteCond %{REQUEST_FILENAME} .*\.(jpeg|jpg|gif|png)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . /public/404.php [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /sso/index.php [L]
</IfModule>```

Upvotes: 1

Views: 86

Answers (1)

RavinderSingh13
RavinderSingh13

Reputation: 133770

Could you please try following, changed sequence of your present rules here(bases on your show rules), couldn't test it. Please make sure to clear browser cache before testing your URLs.

Options -MultiViews
RewriteEngine On
RewriteRule ^community  - [NC,L]

RewriteBase /

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

RewriteCond %{REQUEST_FILENAME} .*\.(jpeg|jpg|gif|png)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ /public/404.php [L]

Upvotes: 1

Related Questions