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

Add redirects to /index.php/path oldies (clean urls) #115

Open
DiegoPino opened this issue Sep 19, 2023 · 0 comments
Open

Add redirects to /index.php/path oldies (clean urls) #115

DiegoPino opened this issue Sep 19, 2023 · 0 comments
Assignees
Labels
Drupal 9 nginx Our preferred web server. We love you
Milestone

Comments

@DiegoPino
Copy link
Member

What?

enforce clean URLs.

Test and add AFTER

location ~ ^/system/files/ { # For Drupal >= 7
try_files $uri /index.php?$query_string;
}

   # Enforce clean URLs
    # Removes index.php from urls like www.example.com/index.php/my-page --> www.example.com/my-page
    # Could be done with 301 for permanent or other redirect codes.
    if ($request_uri ~* "^(.*/)index\.php/(.*)") {
        return 307 $1$2;
    }


(remember/facets don't use clean urls so we need to really test)

@DiegoPino DiegoPino added nginx Our preferred web server. We love you Drupal 9 labels Sep 19, 2023
@DiegoPino DiegoPino added this to the 1.1.0 milestone Sep 19, 2023
@DiegoPino DiegoPino self-assigned this Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Drupal 9 nginx Our preferred web server. We love you
Projects
None yet
Development

No branches or pull requests

1 participant