Good day, I ran into a problem that I can’t get access to the jscript folder at the root
When referring directly to the jscript folder, it gives 404, as if it were a controller.
The following is written in the .htaccess site:

 RewriteEngine on RewriteBase /index.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /shop.php?$1 [L] 

The task was as follows: if a person addresses " domain.com/shop ", he was transferred to the store where the URI set to " shop ", now he accepts this jscript folder as a URI for the store
FrameWork: CodeIgniter .



    2 answers 2

    The task was as follows: if a person addresses "domain.com/shop", he was transferred to the store where the URI is set to "shop", now he accepts this jscript folder as a URI for the FrameWork store: CodeIgniter.

     RewriteRule ^shop$ /shop.php [R=301,L] 

    Maybe you need not to "throw", but a little more? In theory, I understand this: if a person contacts: domain.ru/shop, then the rules apply that send the request to the file shop.php , but not for other requests.

    • So it was exactly that instead of "shop" there could be any word;) except for the specified folders in the site directory. for example css jscript images. - Quiss
    • @Quiss RewriteCond% {REQUEST_URI}! / Images (. *) $ RewriteCond% {REQUEST_URI}! / Css (. *) $ RewriteRule ^ shop (. *) Shop.php? $ 1 [L] Something doesn’t want Apache work differently. hmm - lampa
    • Thanks for the suggested options, at work I’ll see what it can do =) - Quiss
    • I rewrote the scripts of my Tiny MCE and it all worked) moved to the root. Thank you anyway, the option lampa turned out to be the best. - Quiss

    Register before RewriteBase:

     RewriteRule ^jscript/(.*)$ jscript/$1 [L,QSA] 
    • It did not help, but thanks. - Quiss