Both landing.php and all the other pages of my site are in the same directory. I want to be able to access both, however if I have a try_files statement as well as an index statement, I get a 404 error when accessing the index page.
Is there a way to achieve this without conflicting either?
Here's my configuration file:
server { listen 80; access_log /var/www/mysite.com/logs/access.log; error_log /var/www/mysite.com/logs/error.log; root /var/www/mysite.com/public_html/mysite/public/_main; server_name www.mysite.com mysite.com; location / { index landing.php; try_files $uri $uri.php?$query_string; } location ~ \.php$ { try_files $uri =404; include /etc/nginx/fastcgi_params; fastcgi_pass unix:/var/run/php-fastcgi/php-fastcgi.socket; fastcgi_index landing.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } }