We've the next mod_rewrite condition/rule but it's coming back a 404 error on Web addresses that basically begin "i" (or "css" for your matter) if they don't associate especially our corresponding sites (/i /css etc.)
RewriteEngine on RewriteCond $1 !^(index\.php|robots\.txt|/(i|css|design_and_docs|js|test)/*) RewriteRule ^(.*)$ /index.php/$1 [L]
This then disallows me from getting a route/URI (using CodeIgniter however i don't believe that means something) for example /itemid or /idcommand (just a couple of I have had necessity of previously week)
I'm able to easily customize the RewriteCond the following to check for any trailing slash however a request the /i directory, with no trailing slash, fails whereas it formerly labored:
RewriteCond $1 !^(index\.php|robots\.txt|/(i|css|design_and_docs|js|test)\//*)
Using the trailing slash /i/ still resolves which might be adequate for the reasons. But I'd enjoy /i to still resolve towards the corresponding /i directory. So rather than just testing for any trailing slash in the finish, Let me test for any trailing slash, or the lack of any figures.
How do you do this having a regular expression?
Rather than just
\/ for that trailing slash, perform a subgroup and appearance for your or even the finish of string, the industry $:
RewriteCond $1 !^(index\.php|robots\.txt|/(i|css|design_and_docs|js|test)(\/|$)/*)
I am unsure the
/ does what you are expecting. AFAIK you do not need a number one slash in
.htaccess. Perhaps you have attempted this:
RewriteCond $1 !^(index\.php|robots\.txt|i/|css/|design_and_docs/|js/|test/)