1

I already searched for the answer in other questions and tried a few solutions with no luck:

In the root of my website I use the following code in .htaccess and it works fine:

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^(.*)$ index.php?url=$1 [L,QSA]

But now I need to define that when I'm in the /admin directory it has to act normal. Because when for example I link a stylesheet in a file in /admin, I have to define the src as "/admin/something.css" because else it will look for domain.com/css/something.css

Can someone tell me what to do?

Tunaki
  • 132,869
  • 46
  • 340
  • 423
Robin V
  • 101
  • 1
  • 12

1 Answers1

1

Added:

RewriteRule ^admin - [L,NC]

Before anything else.

  • The - means do nothing.
  • The L means this should be last rule; ignore everything following.
  • The NC means no-case (so "ADMIN" is also matched).

Source

Community
  • 1
  • 1
Robin V
  • 101
  • 1
  • 12