nginx / rewrite & htaccess

Dieses Thema im Forum "Installation und Konfiguration" wurde erstellt von degoya, 25. Feb. 2015.

  1. degoya

    degoya New Member

    Hallo zusammen,

    wie bekomme ich hier noch ein htaccess passwort dazu?

    Code:
    location / {
    rewrite ^/(en|de|fr|it)/css(.*)$ /css$2 break;
    rewrite ^/(en|de|fr|it)/js(.*)$ /js$2 break;
    rewrite ^/(en|de|fr|it)/img(.*)$ /img$2 break;
    rewrite ^/(en|de|fr|it)/assets(.*)$ /assets$2 break;
    rewrite ^/(en|de|fr|it)/fonts(.*)$ /fonts$2 break;
    rewrite ^/(en|de|fr|it)/theme(.*)$ /theme$2 break;
    rewrite ^/(en|de|fr|it)/content(.*)$ /content$2 break;
    if (!-e $request_filename){
    rewrite ^/(en|de|fr|it)?/?(.*)$ /index.php?cultureKey=$1&q=$2 last;
    }
    }
    location ~ /\.ht {
    deny all;
    }
     
  2. nowayback

    nowayback Well-Known Member

    Code:
    location / {
    rewrite ^/(en|de|fr|it)/css(.*)$ /css$2 break;
    rewrite ^/(en|de|fr|it)/js(.*)$ /js$2 break;
    rewrite ^/(en|de|fr|it)/img(.*)$ /img$2 break;
    rewrite ^/(en|de|fr|it)/assets(.*)$ /assets$2 break;
    rewrite ^/(en|de|fr|it)/fonts(.*)$ /fonts$2 break;
    rewrite ^/(en|de|fr|it)/theme(.*)$ /theme$2 break;
    rewrite ^/(en|de|fr|it)/content(.*)$ /content$2 break;
    if (!-e $request_filename){
    rewrite ^/(en|de|fr|it)?/?(.*)$ /index.php?cultureKey=$1&q=$2 last;
    }
    auth_basic "Passwort Bereich";
    auth_basic_user_file /var/www/domain/web/.htpasswd;
    }
    location ~ /\.ht {
    deny all;
    }
    So in etwa würde ich denken
     

Diese Seite empfehlen