0
votes

The following .htaccess code is used at my /business/ website, and as it is a demonstration website I would have to copy it several times, with different folder names... Like /business/ /restaurants/ /law/, etc

Is it possible to remove the RewriteBase /business/ and RewriteRule . /business/index.php [L]?

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /business/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /business/index.php [L]
</IfModule>
1

1 Answers

0
votes

Technically, you should just be able to do this, removing the RewriteBase and the absolute URI-path in the rule's target:

RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]

But depending on the index.php and how it extracts URI info, it may not like it. You should be able to put that in any folder.