sEnte Posted February 15, 2014 at 02:34 AM Report #545357 Posted February 15, 2014 at 02:34 AM Tenho estas condições num ficheiro .htaccess RewriteEngine On RewriteCond %(REQUEST_FILENAME) !-d RewriteCond %(REQUEST_FILENAME) !-f RewriteCond %(REQUEST_FILENAME) !-i RewriteRule ^(.+)$ index.php?url=$1 [QSA,L] e usando este site (atenção que não estou a fazer qualquer tipo de publicidade apenas estou a mostrar o site para saber se pode, ou não, estar a fazer a conversão corretamente) http://winginx.com/htaccess e deu-me isto # nginx configuration location / { rewrite ^(.+)$ /index.php?url=$1 break; } mas parece não funcionar :S "If It Ain't Broke, Break it and build something Cooler!" Unknown
I-NOZex Posted February 15, 2014 at 11:46 AM Report #545367 Posted February 15, 2014 at 11:46 AM algo disto te deverá ajudar: http://stackoverflow.com/a/8711708/1869192 http://www.anilcetin.com/convert-apache-htaccess-to-nginx/ http://serverfault.com/a/24247 B2R » Beat2Revolution v3.0b | Regista e divulga-nos beat2revolution.net
sEnte Posted February 15, 2014 at 12:36 PM Author Report #545375 Posted February 15, 2014 at 12:36 PM Já andei a dar uma vista de olhos por isso mas mesmo assim não parece funcionar. será que tenho de instalar ou ativar alguma coisa? "If It Ain't Broke, Break it and build something Cooler!" Unknown
I-NOZex Posted February 15, 2014 at 05:26 PM Report #545400 Posted February 15, 2014 at 05:26 PM nunca tabalhei com nginx :| memo de apache... err safome... alguem hade poder ajudar-te melhor que eu... B2R » Beat2Revolution v3.0b | Regista e divulga-nos beat2revolution.net
yoda Posted February 15, 2014 at 05:52 PM Report #545407 Posted February 15, 2014 at 05:52 PM Experimenta assim : location / { index index.php index.html index.htm; try_files $uri index.php; } before you post, what have you tried? - http://filipematias.info sense, purpose, direction
sEnte Posted February 15, 2014 at 06:46 PM Author Report #545410 Posted February 15, 2014 at 06:46 PM yoda estás a falar da config do nginx ou do que devo meter no .htaccess? a config do nginx tenho isto location / { try_files $uri $uri/ /index.html; } a config no que toca à parte do servidor é esta... server { listen 80; root /usr/share/nginx/www; index index.php index.html index.htm; server_name example.com; location / { try_files $uri $uri/ /index.html; } error_page 404 /404.html; error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/www; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ \.php$ { try_files $uri =404; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } "If It Ain't Broke, Break it and build something Cooler!" Unknown
yoda Posted February 15, 2014 at 11:50 PM Report #545439 Posted February 15, 2014 at 11:50 PM No htaccess before you post, what have you tried? - http://filipematias.info sense, purpose, direction
Rui Carlos Posted February 20, 2014 at 11:55 PM Report #546001 Posted February 20, 2014 at 11:55 PM Tanto quanto sei o nginx não tem htaccess. As regras de rescrita ficam normalmente na configuração do site (dentro de um server). O que devias ter no ficheiro de configuração era location / { rewrite ^(.+)$ /index.php?url=$1 break; } em vez de location / { try_files $uri $uri/ /index.html; } Rui Carlos Gonçalves
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now