1

I have site in production with own .htaccess file :

DirectoryIndex index.php RewriteEngine On RewriteRule ^about$ about.php [NC] RewriteRule ^contact$ contact.php [NC] RewriteRule ^portfolio$ portfolio.php [NC] RewriteRule ^home$ index.php [NC] RewriteRule ^companies$ companies.php [NC] 

I created demo_version of new site in the subdirectory my_site.com/demo_site, and i want to write rules in my_site.com htaccess rewrite rules for subdirectory:

Options +FollowSymLinks RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* index.php 

How can i split this rules?

1 Answer 1

1

Keep first part of .htaccess shown in root .htaccess and keep this in /demo_site/.htaccess:

DirectoryIndex index.php Options +FollowSymLinks RewriteEngine on RewriteBase /demo_site/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . index.php [L] 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.