I am a new programmer, currently learning php mvc. I am creating a framework / mvc system from scratch ... Now I am facing a problem with .htaccess.
example.com = localhost // unable to post question for localhost link
My app url is as follows:
http://example.com/mvc/index.php?go=test // test is a controller name
Using .htaccess I cleared the url ....
http://example.com/mvc/test
If the controller does not exist, it displays an error message containing some error message.
http:
But if I put "/" (slash) in url ...
http://example.com/mvc/test/
, it shows an error, but does not load the css or js file.
I also included the controller method in url ...
http://example.com/mvc/test/viewresult
If no matching method is found in this controller, an error message is displayed, but the same problem ... no css or js.
I have fully loaded css and js if I look through the full url
http://example.com/mvc/index.php?go=doesnotexists/
etc.
I tried a few .htaccess rules but couldn't get it to work. Please help and thanks in advance. My .htaccess code.
<IfModule mod_rewrite.c>