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

why fastRoute not working in my server #255

Open
pabios opened this issue Sep 28, 2022 · 8 comments
Open

why fastRoute not working in my server #255

pabios opened this issue Sep 28, 2022 · 8 comments
Labels

Comments

@pabios
Copy link

pabios commented Sep 28, 2022

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

could someone help?

thank you

@lcobucci
Copy link
Collaborator

@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.

@pabios
Copy link
Author

pabios commented Oct 3, 2022

@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 ?

@omatamix
Copy link

omatamix commented Nov 7, 2022

index.php/hello does not look right.

@omatamix
Copy link

omatamix commented Nov 7, 2022

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.

@dontKnew
Copy link

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.

Without this ,fast router will not work ?

@dontKnew
Copy link

Mine also same problme !

@JanisE
Copy link

JanisE commented Feb 13, 2023

I would suggest this crucial additional information is added to the documentation/readme.

@lcobucci
Copy link
Collaborator

lcobucci commented Jan 9, 2024

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 👍

I'll squeeze this in before tagging the first pre-release versions, but feel free to send PRs.

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

No branches or pull requests

5 participants