Nginx clean url

Raúl's Avatar

Raúl

22 Jul, 2014 12:52 PM

Hi!

I use nginx and i can't use clean url :'(

I try to put this code on my website config (http://support.berta.me/discussions/suggestions/4778-nginx-support) and convert htaccess to nginx config but i can't.

¿Any idea?

... ehm! sorry, my english sucks.

  1. Support Staff 1 Posted by Uldis on 22 Jul, 2014 02:40 PM

    Uldis's Avatar

    Hello, Raúl
    sorry, I don't have a nginx testing environment available at the moment, did you tried this configuration:

        location / {
                try_files $uri @rewrite;
        }
        location /engine {
                rewrite ^ /engine/index.php;
        }
        # This block will catch static file requests, such as images, css, js
        # The ?: prefix is a 'non-capturing' mark, meaning we do not require
        # the pattern to be captured into $1 which should help improve performance
        location ~* .(?:ico|css|js|gif|jpe?g|png)$ {
                # Some basic cache-control for static files to be sent to the browser
                expires max;
                add_header Pragma public;
                add_header Cache-Control "public, must-revalidate, proxy-revalidate";
        }
        location @rewrite {
                rewrite ^ /index.php;
        }
    

    You can also use our hosting service without any installation worries here: http://hosting.berta.me/create-new-site

    Good luck

  2. Uldis closed this discussion on 22 Jul, 2014 02:40 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac