Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Muhammad.shahid.shah's avatar

Two questions (pasting code, Making my own route , the php practitioner)

Q1: how to paste my code here(in nice way like you do)?

Q2: i watched the php practitioner lesson there i reached to a lecture of making our own routes, so i am facing a problem of url formatting, my url structure is something like this localhost/framework (im using xampp within htdocs i have framework folder) now i did same as jeffery did but he gets url format like this (localhost:8887/about/..) and if i do localhost/framework/about (i defined it in routes file) i get requested url not found on this server, but works for me when i define it like this in routes.php and execute the url on browser like this localhost/framework/index.php/about , even if i extract the files outside of framework, like this , localhost/about and define it same as in video still get the same error. i dont know how i explained my problem, but the problem is i must have to include index.php in url to make it work while jeffery didnt use index.php there his url is clean, and i know the code is executing on index.php thats why i have to use it, but if u watch that video of making route in php practitioner u will see that in his url there is no index.php , while i am doing the same but with additional working folder of framework, sorry for long question but i am trying to clear my point.

0 likes
4 replies
Muhammad.shahid.shah's avatar

thanks to both of you 50 + 50 from both of you made me 100 , so which answer should i select i dont know, maybe nginx provides auto formating of url, i copied the .htaccess file of laravel's public directory and pasted it in my framework folder(inside htdocs) now its fine.

1 like

Please or to participate in this conversation.