I have the urls like
http://localhost/mis
http://localhost/mis/newsletter.php
http://localhost/mis/cms.php?mainid=65
http://localhost/mis/news.php?mainid=93
Well I am using these urls for school section.
Now for the A-level section I have the following urls
http://localhost/mis/index.php?mode=0
http://localhost/mis/newsletter.php?mode=0
http://localhost/mis/cms.php?mainid=65&mode=0
http://localhost/mis/news.php?mainid=93&mode=0
I want the above urls to be routed like
http://localhost/mis/a-level
http://localhost/mis/a-level/newsletter.php
http://localhost/mis/a-level/cms.php?mainid=65
http://localhost/mis/a-level/news.php?mainid=93
Please help me out with these url routing via .htaccess file.
EDIT: The htaccess file is under mis folder
FILE STRUCTURE:
root>>
mis>>
.htaccess
newsletter.php
cms.php
news.php
Try these in the .htaccess file inside the
/misfolder.I think the lines like
http://localhost/mis/cms.php?mainid=65&mode=0are just copy-paste errors and you ment:http://localhost/mis/cms.php?mainid=65&mode=0I have tested these rules. If they don’t work on your system there must be some configuration issue. Are there other rewrite rules in your file? I not, try enabling rewrite logging to get some more information. This must be enabled in httpd.conf (they are not allowed in .htaccess).
My rewrite log for the url
http://proba.test/mis/a-level/news.php?some=thing&other=33And the log for:
http://proba.test/mis/a-level