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

Nginx Configuration #69

Open
square-foot opened this issue Jul 27, 2024 · 0 comments
Open

Nginx Configuration #69

square-foot opened this issue Jul 27, 2024 · 0 comments

Comments

@square-foot
Copy link

square-foot commented Jul 27, 2024

Hi

.htaccess is useful only for Apache websites. I am trying out the following server configuration (usually kept in the /etc/sites-available folder) for Nginx

location / {
    if ($request_filename ~* \.(png|jpg|webp|gif|jpeg|zip|css|svg|js|pdf|html)$) {
        break;
    }

    try_files $uri /routes.php$is_args$args;

  
}

It seems to work. I wanted to send .html files directly instead of routing thru routes.php but that is working if I specify the .html file on the URL but if I do not give it, it should have sent it to index.html automatically,... possibly the routes.php has stuck onto the bare minimum "/" url I wonder how to make it go to /index.html

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

1 participant