elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: AIO elhacker.NET 2021 Compilación herramientas análisis y desinfección malware


+  Foro de elhacker.net
|-+  Sistemas Operativos
| |-+  GNU/Linux (Moderador: MinusFour)
| | |-+  htaccess en nginx
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: htaccess en nginx  (Leído 1,657 veces)
WIитX


Desconectado Desconectado

Mensajes: 1.024


WINTX


Ver Perfil WWW
htaccess en nginx
« en: 27 Julio 2015, 18:43 pm »

Hola chicos tengo un htaccess que quiero pasar a mi nginx que será cambiando el código y añadirlo en el nginx.conf supongo bueno por eso escribo este post para preguntar xD

Código:
RewriteEngine On
RewriteRule ^client(|/)$ /client.php
RewriteRule ^clientutils(|/)$ /client.php
RewriteRule ^flash_client_error(|/)$ /client.php
RewriteRule ^me(|/)$ /me.php
RewriteRule ^Mantenimiento(|/)$ /maintenance.php
RewriteRule ^Ajustes(|/)$ /settings.php
RewriteRule ^Comunidad(|/)$ /community.php
RewriteRule ^Noticias(|/)$ /articles.php
RewriteRule ^Equipo(|/)$ /team.php
RewriteRule ^Alfas(|/)$ /alfas.php
RewriteRule ^Referidos(|/)$ /referidos.php
RewriteRule ^Registro(|/)$ /register.php
RewriteRule ^Perfil(|/)$ /perfil.php
RewriteRule ^Tienda(|/)$ /store.php
RewriteRule ^Tienda=ComprarVip(|/)$ /buyvip.php
RewriteRule ^Tienda=ComprarRares(|/)$ /buyrares.php
RewriteRule ^Tienda=ComprarRespetos(|/)$ /buyresp.php
RewriteRule ^cacheCheck(|/)$ /cacheCheck.php
RewriteRule ^account/disconnected(|/)$ /index.php?logout=true
RewriteRule ^logout/(|/)$ /index.php?logout=true
RewriteRule ^Badgedata/badge/([^/]+)(|/)$ ./habbo-imaging/badge.php?badge=$1
RewriteRule ^habbo-imaging/badge/([^/]+)(|/).gif$ ./habbo-imaging/badge.php?badge=$1
RewriteRule ^habbo-imaging/badge/([^/]+)(|/)$ ./habbo-imaging/badge.php?badge=$1
RewriteRule ^inc/(..*)$ ./index.php
RewriteRule ^tpl/(..*)$ ./index.php
RewriteRule ^tpl/Generic/(..*)$ ./index.php
RewriteRule ^habbo-imaging/avatarimage(|/)$ /habbo-imaging/avatar.php

Esto lo e convertido en esto:

Código:
# nginx configuration
location /client {
rewrite ^/client(|/)$ /client.php;
}
location /clientutils {
rewrite ^/clientutils(|/)$ /client.php;
}
location /flash_client_error {
rewrite ^/flash_client_error(|/)$ /client.php;
}
location /me {
rewrite ^/me(|/)$ /me.php;
}
location /Mantenimiento {
rewrite ^/Mantenimiento(|/)$ /maintenance.php;
}
location /Ajustes {
rewrite ^/Ajustes(|/)$ /settings.php;
}
location /Comunidad {
rewrite ^/Comunidad(|/)$ /community.php;
}
location /Noticias {
rewrite ^/Noticias(|/)$ /articles.php;
}
location /Equipo {
rewrite ^/Equipo(|/)$ /team.php;
}
location /Alfas {
rewrite ^/Alfas(|/)$ /alfas.php;
}
location /Referidos {
rewrite ^/Referidos(|/)$ /referidos.php;
}
location /Registro {
rewrite ^/Registro(|/)$ /register.php;
}
location /Perfil {
rewrite ^/Perfil(|/)$ /perfil.php;
}
location /Tienda {
rewrite ^/Tienda(|/)$ /store.php;
rewrite ^/Tienda=ComprarVip(|/)$ /buyvip.php;
rewrite ^/Tienda=ComprarRares(|/)$ /buyrares.php;
rewrite ^/Tienda=ComprarRespetos(|/)$ /buyresp.php;
}
location /cacheCheck {
rewrite ^/cacheCheck(|/)$ /cacheCheck.php;
}
location /account {
rewrite ^/account/disconnected(|/)$ /index.php?logout=true;
}
location /logout {
rewrite ^/logout/(|/)$ /index.php?logout=true;
}
location /Badgedata {
rewrite ^/Badgedata/badge/([^/]+)(|/)$ /habbo-imaging/badge.php?badge=$1;
}
location /habbo {
rewrite ^/habbo-imaging/badge/([^/]+)(|/).gif$ /habbo-imaging/badge.php?badge=$1;
rewrite ^/habbo-imaging/badge/([^/]+)(|/)$ /habbo-imaging/badge.php?badge=$1;
rewrite ^/habbo-imaging/avatarimage(|/)$ /habbo-imaging/avatar.php;
}
location /inc {
rewrite ^/inc/(..*)$ /index.php;
}
location /tpl {
rewrite ^/tpl/(..*)$ /index.php;
rewrite ^/tpl/Generic/(..*)$ /index.php;
}

Y ahora me falta esto que no me deja convertirlo :S

Código:
<Files *.css>
SetOutputFilter DEFLATE
</Files>
<Files *.js>
SetOutputFilter DEFLATE
</Files>

ErrorDocument 400 /index.php
ErrorDocument 401 /index.php
ErrorDocument 403 /index.php
ErrorDocument 404 /index.php
ErrorDocument 500 /index.php

# BEGIN Compress text files - CMS by Jeihden
<ifModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/xml text/css text/plain
  AddOutputFilterByType DEFLATE image/svg+xml application/xhtml+xml application/xml
  AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml
  AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript application/json
  AddOutputFilterByType DEFLATE application/x-font-ttf application/x-font-otf
  AddOutputFilterByType DEFLATE font/truetype font/opentype
 
  AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript
</ifModule>


En línea

"Es más divertido hacerse pirata que unirse a la marina." (Steve Jobs)
Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Ejecución de código arbitrario en servidores nginx
Noticias
wolfbcn 0 1,422 Último mensaje 10 Mayo 2013, 01:14 am
por wolfbcn
Apache o nGinx? Debian 7
Desarrollo Web
WIитX 3 2,672 Último mensaje 13 Enero 2015, 11:41 am
por #!drvy
htaccess para nginx - Convertidor
Desarrollo Web
WIитX 1 1,779 Último mensaje 13 Enero 2015, 11:55 am
por #!drvy
nGinx no lee el php >:(
GNU/Linux
WIитX 3 2,404 Último mensaje 11 Agosto 2015, 12:29 pm
por WIитX
web.config o .htaccess en nGinx
GNU/Linux
WIитX 0 1,814 Último mensaje 24 Diciembre 2015, 14:15 pm
por WIитX
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines