I have a website https://example.com
which has 2 subdirectories, https://example.com/admin and https://example.com/store.
- I want to hide
/storefrom URL so my requests would look like:https://example.com/shop.php?id=someid - But Also, I want
https://example.com/admin/index.phpto work. - I found some answers that achieve both 1 and 2 but they change base root so all my css,js, images don't load
So far I have:
RewriteCond %{HTTP_HOST} ^(www\.)?example.com$
RewriteRule ^store/(.*) /$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^(www\.)?example.com$
RewriteRule !^store/ store%{REQUEST_URI} [L]
This achieves 1 but not 2.