php - htaccess eliminate folders -
this htaccess code,
it re-write urls this
mysite.com/profile.php?id=123&network=stackoverflow
to this
mysite.com/stackoverflow/profile.php?id=123
but problem is, users cannot reach js,css or images. i.e.
mysite.com/css/style.css mysite.com/js/javascript.js mysite.com/img/logo.png
how can eliminate real folders img,js,css etc..?
my htaccess is,
options +followsymlinks rewriteengine on rewriterule ^([^\/]+)/(.*)$ /$2?network=$1 [qsa,l]
the following ignore requests actual files/directories
rewriteengine on rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^([^\/]+)/(.*)$ /$2?network=$1 [qsa,l]
Comments
Post a Comment