always index |
Hello, my problem is: my index.php file is in public folder ,my view about.php is in Views folder. I made a Controller About.php
PHP Code: <?php with route $routes->get('/about','About::index'); but when i click on about page in URL is virtualhostrname/about.php but the index is always displayed. .htacces file is ok rewrite engine is on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule^([\s\S]*)$ index.php/$1 [L,NC,QSA] .env app.$baseURL='htttp://virtualhostname/' in app config public string $baseURl='http://virtualhostname/' and always is index page and in url is virtualhostname/about.php }
The URL should be http://virtualhostname/about
Not http://virtualhostname/about.php Try the official tutorial: https://codeigniter4.github.io/CodeIgnit...index.html |
Welcome Guest, Not a member yet? Register Sign In |