htaccess redirect

1

I have the following redirect:

RewriteRule ([^/]*)\/([^/]*) http://ip/~user/codigo.php?nome=$1&numero=$2

To generate the url:

  

link

But there are other folders, such as assets / css / main.css and others like /css/name / other.css and these are being redirected to:

  

Ex: link

How to solve the problem?

I tried something like:

RewriteRule ^assets/(.*)$ http://www.site.com.br/assets/$ 

Note: There are other folders, in addition to the example assets and some of them have subfolders and some do not exist, ie there is no default.

    
asked by anonymous 26.10.2017 / 18:44

1 answer

0

I have found a solution to my problem.

I've added the following:

RewriteRule ^(assets|css|images|js|fonts) - [L]

Before Redirection:

RewriteRule ([^/]*)\/([^/]*) http://ip/~user/codigo.php?nome=$1&numero=$2

And it worked perfectly.

For those of you with the same problem, this is the solution.

    
27.10.2017 / 15:05