Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

route issue - URL not found #98

Open
mofizul21 opened this issue Jan 17, 2021 · 1 comment
Open

route issue - URL not found #98

mofizul21 opened this issue Jan 17, 2021 · 1 comment

Comments

@mofizul21
Copy link

Hi,

Thanks for your awesome work. I'm using PHP 7.4. Win 10 64bit with Laragon. Here is my route code

$router->controller('/', App\Controllers\HomeController::class);
$router->controller('/users', App\Controllers\UsersController::class);

Here HomeController is working fine, when I go to my application home (https://smsecom.test), it's working fine.

But when I'm going to https://smsecom.test/users URL, I see:
Not Found
The requested URL /users was not found on this server.

I've configured composer.json, controllers, very well.

What is the problem here?

@mofizul21 mofizul21 changed the title route issue route issue - URL not found Jan 17, 2021
@SherlokMo
Copy link

SherlokMo commented Feb 3, 2021

You have to create a .htcasses file on your public directory that contains
``RewriteEngine On
# RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !.(css|js|icon|zip|rar|png|jpg|gif|pdf)$ index.php [L]``

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants