• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question nginx rewrites

andyxyz

Basic Pleskian
Server operating system version
Ubuntu 22.04
Plesk version and microupdate number
Version 18.0.61 Update #6
I am trying to do a very simple removal of index.php from a url using nginx only config.

eg


The standard code

location ~* ^/index\.php/(.*)$ { return 301 /$1;}
has no effect in Additional nginx settings and has to be placed within the server block .. which of course will not survive a rebuild.
this seems a spectacularly straight forward request.. how are people doing this?
 
Not sure why you would need a custom template for this. Any Nginx directive you add to the Additional Nginx directive gets added to the server block already.

Most common directive for beautifying links/permalinks look something like:
NGINX:
location / {
            try_files $uri $uri/ /index.php?$args;
}
The exact implementation depends on your website/application.
 
Not sure why you would need a custom template for this. Any Nginx directive you add to the Additional Nginx directive gets added to the server block already.

Most common directive for beautifying links/permalinks look something like:
NGINX:
location / {
            try_files $uri $uri/ /index.php?$args;
}
The exact implementation depends on your website/application.
Tried that 1st.. no effect at all.
 
Back
Top