As avea nevoie de ajutor de la un profesionist in nginx
vreau sa rescriu un url care arata cam asa
+++++++++++++++++++++++++++++++++
http://subdomeniu.domeniu.com/index.php?c=/Businesssi vreau sa devina
http://subdomeniu.domeniu.com/Test/Business+++++++++++++++++++++++++++++++++++++
practic setez in script ca fisierul este lipsit de extensie si atunci folosesc modul scurt url
deci index.php il redenumesc si devine Test fisierul Test trebuie fortat sa fie executat ca si cum ar fi un fisier normal php in apache merge foarte bine dar in ngnix nu am reusit sal fac sa functioneze
in apache am setat astfel:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
<Files "Test">
ForceType application/x-httpd-php
</Files>
DirectoryIndex Test
Additionally if you are using Apache 2 you may need to add
AcceptPathInfo On
+++++++++++++++++++++++++++++++++++++++++
in ngnix
htaccess am setat astfel
+++++++++++++++++++++++++++++++++
<Files "Test">
ForceType application/x-httpd-php
</Files>
DirectoryIndex Test
AcceptPathInfo On
RewriteEngine on
Options +FollowSymlinks
#RewriteRule ^Test\/(.*)$ index\.php?c=/$1 [T=application/x-httpd-php]
#RewriteRule ^Test/(.*)$1 index.php?c=$ [L, QSA]
RewriteRule ^(.*)$ index.php=?c/$1 [L]
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
cam asa arata o parte din fisierul meu de configratie referitor la subdomeniul respectiv
+++++++++++++++++++++++++++++++++++++++++++++++++++++
server {
listen 80;
server_name subdomeniu.domeniu.com;
#charset koi8-r;
#location ~ \.* {
# proxy_pass
http://XXX.XXXX.XXXX:YY;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_buffer_size 128k;
# proxy_buffers 8 128k;
#
#
#}
location / {
root /var/www/html/subdomeniu;
index index.php index.html index.htm;
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php last;
break;
}
}
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/html/subdomeniu$fastcgi_script_name;
include fastcgi_params;
}
location ~ index.php$ {
root /var/www/html/subdomeniu;
if (!-e $request_filename) {
rewrite ^(.+)$ /index.php last;
# rewrite ^(.*)$ /index.php?c=$1 last;
break;
}
}
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_pass /tmp/php-fastcgi.socket;
# fastcgi_param SCRIPT_FILENAME /var/www/html/subdomeniu$fastcgi_script_name;
# include fastcgi_params;
# }
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}