I can not add specific rewrite rule to .htaccess file in which codeigniter rewrite rules present.
Options -Indexes
Options +FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI}
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|images|robots\.txt|css|docs|js|system|sayfalar|main\.php)
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^main/(.*)$ /main.php?tag=$1 [L,NC]
DirectoryIndex home.php
</IfModule>
The section RewriteRule ^main/(.*)$ /main.php?tag=$1 [L,NC]
not working at all
When I type site.com/main/decoraion corresponding to main.php?tag=decoration , I got Codeigniter'S 404 error page. Codeigniter's rule handles the request though I tell htaccess not to consider main.php file when rewriting
What is the correct way for adding this rule?