Q:

URL prefix using .htaccess

I want to prefix the incoming URL using an htaccess file. For example, the URL might be http://localhost/george_shop.html, I want the htaccess to prefix it like http://localhost/route/george_shop.html
This is my htaccess right now:
<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]

    RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::\2$
    RewriteRule ^(.*) - [E=BASE:%1]
    RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L]
</IfModule>

Update
If it helps, this is the Slim3 htaccess

A:

I suggest you  use slim regexp, your route can by dynamic by doing something like so:
$app->get('/{route:.*(?:html)$}', function($req, $res, $args) {});

Hope it helps

