Jump to content

Recommended Posts

Posted

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

Posted

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

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.