php - How to hide a subfolder in url rewriting -
my site : www.mysite.com/subfolder/login/index.php
i want url there www.mysite.com/login/index.php
. tried modifying .htaccess file in root folder follows:
rewriterule ^login\/index\.php$ /subfolder/login/index.php [l]
--but problem can't use or access css file (style.css) login folder.
# fix js/images/css rewriterule ^.+?/((img|css|js)/.+)$ /subfolder/login/$1 [l,nc]
try adding first rule in htaccess
. or can use
# fix js/images/css rewriterule ^.+?/((img|css|js)/.+)$ http://www.yourdomain.com/subfolder/login/$1 [l,nc]
you can see more examples , ways of rewriting here: https://wiki.apache.org/httpd/rewrite
Comments
Post a Comment