why fastRoute not working in my server
hello my local project work but when i am uploading code to server nothing work .
i.e : this way localhost:9000/hello works but this one http://api.domaine.com/hello does not working
- sever ionos -PHP 8
- composer installed in my server
- my index.php file in github
could someone help?
thank you
@pabios there are so many different things that might be happening on the server... It's very difficult to help you without knowing (at least) error messages.
@lcobucci Thank you for your reply . by the way, I just have a 500 error. as a response from the server.
when i change my route to $r->addRoute('GET', 'index.php/hello', '\Pabiosoft\Controller\FastController::direBonjour'); it'is work
but i just want to send $r->addRoute('GET', '/hello', '\Pabiosoft\Controller\FastController::direBonjour'); without index.php prefixe in my addRoute
other tip ?
index.php/hello does not look right.
Looks like you need route all requests to your index.php file.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
This might fix your error.
Looks like you need route all requests to your
index.phpfile.RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]This might fix your error.
Without this ,fast router will not work ?
Mine also same problme !
I would suggest this crucial additional information is added to the documentation/readme.
The webserver configuration is beyond the scope of this library and I'd prefer not to have to add configuration for Apache, Nginx, Caddy, etc.
We can surely do a better job and reinforce the need for sending all requests to the file that is routing your application :+1:
I'll squeeze this in before tagging the first pre-release versions, but feel free to send PRs.