nginx / rewrite & htaccess

degoya

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;
}
 

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
 

Werbung

Top