Portál AbcLinuxu, 30. listopadu 2025 01:55
http://example.com/a/xxxxx.aana
http://example.com/x/a.php?aid=xxxxxa z
http://example.com/a/xxxxx.bbna
http://example.com/x/a.php?aid=xxxxx
rewrite ^/a/(\w+)\.(aa|bb)$ /x/a.php?aid=$1? last;
location / {
rewrite ^/a/(.*)\.(aa|bb)$ /x/a.php?aid=$1? last;
}
+ pak samozrejme predpokladam ze tam mas location zachytavajici php skripty:
location ~ \.php$ {
# definice fcgi php
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_pass 127.0.0.1:5000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /cesta/k/wwwrootu$fastcgi_script_name;
include fastcgi_params;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_intercept_errors on;
fastcgi_ignore_client_abort off;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
}
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.