-
I am trying to create new php only project using Laragon. My pretty URL is working Anyone with idea on how to deal with this issue? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
It sounds like you need to set up URL rewriting in your project. This will allow your web server to redirect requests for specific URLs to the appropriate PHP file. Here's how you can set up URL rewriting using Apache and a .htaccess file: Create a new file named '.htaccess' in the root directory of your project.
Save the file and try accessing your pages again. This code tells Apache to enable URL rewriting, and to redirect all requests that are not for existing files or directories to |
Beta Was this translation helpful? Give feedback.
-
@LebToki I want to update the app structure so that the root document is in the public folder. How do I achieve that so that when I still visit |
Beta Was this translation helpful? Give feedback.
It sounds like you need to set up URL rewriting in your project. This will allow your web server to redirect requests for specific URLs to the appropriate PHP file.
Here's how you can set up URL rewriting using Apache and a .htaccess file:
Create a new file named '.htaccess' in the root directory of your project.
Add the following code to the file:
Save the file and try accessing your
demo.test/contact
or
demo.test/about
pages again.
This code tells Apache to enable URL rewriting, and to redirect all requests that are not for existing files or directories to
inde…