L
L
lordning9992022-03-17 14:05:48
htaccess
lordning999, 2022-03-17 14:05:48

Htaccess Laravel Root how to add directive?

Hello everyone, tell me how to make a section exception in the root of the site.

If htaccess is like this:

<IfModule mod_rewrite.c>
    RewriteEngine on

    RewriteRule ^(.*)$ public/$1 [L]

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

But I need that another section or cgi script was opened by url domain.name/tex?uhfiwef,
RewriteRule ^tex(.*)$ /cgi-bin/mathtex.cgi?$1 [L,QSA]

If I insert simply, after RewriteRule on, it does not work, help me solve the problem.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2022-03-17
@lordning999

RewriteEngine on

RewriteRule ^tex(.*)$ /cgi-bin/mathtex.cgi?$1 [L,QSA]

RewriteCond %{REQUEST_URI} !^/cgi-bin/mathtex\.cgi
RewriteRule ^(.*)$ public/$1 [L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question