Hello forums
I have some problem regarding regex in url rewriting.
case:
.htaccess

Options -Indexes
Options +FollowSymlinks

RewriteEngine on
RewriteRule ^admin/(.*)$ admin_$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
# Main URL rewriting.
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]

Everything works fine except for admin part.
When admin/any_text comes in url, it routes to admin_any_text. but i want resitriction in some cases as i have folder structure for admin as:

-admin
--js
--themes
---default
----images
----css

I want to modify rule: RewriteRule admin/(.*)$ admin_$1 [L] so that it doesn't rewrite for admin/js,admin/themes
How to accomplish this ?
Thanks in advance for the valueable suggestions.

    Add additional conditions to your rewwrite rules:

    e.g.:

    RewriteCond %{REQUEST_URI} !/admin/js/(.*) [NC]

      a month later

      Hello forums!!
      I am reopening this thread because this regex didn't worked in live server
      though it worked perfectly in localhost.
      In the live server apache is V1.3. I think the regex is not running its because of assertion type.
      The error shown by the server is compilation error.
      Is there any alternatives for this regex that doent use assertion.

      Thanks in advance for the valueable help.

        Write a Reply...