Welcome! Log In Create A New Profile

Advanced

Apache to nginx .htaccess

Posted by Levanov 
Apache to nginx .htaccess
August 13, 2012 11:18AM
Hi

I'm using Apache and have .htaccess like tihs.

RewriteEngine on
RewriteCond %{REQUEST_URI} !^/casastatus
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ dispatcher.php/$1

And I get requests like /dispatcher.php/cmd/somejob/1/XXXXXXXXXX

I just want to send these requests to php-fpm becaue php application has url dispatcher and Apache can understand dispather.php exists. When I configure nginx+php-fpm with this configuration; I get not found error in error log;

location ~* ^/dispatcher.php(.+)$ {
include /etc/nginx/fastcgi.conf;
fastcgi_pass 127.0.0.1:9000;
}

How can i do this with nginx?

Thanx a lot
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 169
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready