Remove index.php from URL

Hi

I've uploaded a flat file CMS called statamic, www.statamic.com, to my linode server. The server runs on Nginx.

Through my .htaccess file, I try to remove the "index.php"-part from my URL, but it won't work. Here's my code in the .htaccess file:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [QSA,L]

My server administrator says the Nginx settings are ok. Statamic support says the .htaccess file should do the job. But it still doesn't work.

Have you got any idea what I could do?

Thanks for reading.

1 Reply

Nginx doesn't use .htaccess files, try adding this to your location / block try_files $uri $uri/ /index.php?$args;

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct