Тема: mysql + .htaccess
Показать сообщение отдельно

  #4  
Старый 10.04.2012, 01:32
Pirotexnik
Постоянный
Регистрация: 13.10.2010
Сообщений: 375
Провел на форуме:
97332

Репутация: 38
По умолчанию

UPD!!!

Там стоит nginx!

Для него конфиги тоже задаются .htaccess?

Несмотря на это в дире /admin .htaccess работает исправно!

Конфиг nginx

Код:
user nginx;
 worker_processes 6;
 worker_rlimit_nofile 10240;

 #error_log /var/log/nginx/error.log;
 error_log /var/log/nginx/error.log notice;
 #error_log /var/log/nginx/error.log info;

 #pid /var/run/nginx.pid;

 events {
 worker_connections 1024;
 }

 http {
 include mime.types;
 default_type application/octet-stream;

 log_format main '$remote_addr $remote_user [$time_local] "$request" '
 '$status $body_bytes_sent "$http_referer" '
 '"$http_user_agent" "$http_x_forwarded_for"';

 access_log off;

 sendfile on;
 # tcp_nopush on;
 # tcp_nodelay on;

 #keepalive_timeout 0;
 keepalive_timeout 65;

 gzip on;
 gzip_disable "msie6";

 index index.php index.html index.htm;

 client_max_body_size 500m;
 upload_progress upload 1m;
 upload_progress_json_output;

 server {
 listen 80;
 server_name target.net;
 rewrite ^ http://www.target.net$request_uri permanent;
 }

 server {
 listen 80;
 server_name www.target.net 
 target.at www.target.at
 target.name www.target.name
 target.org www.target.org
 target.tk www.target.tk
 target.us www.target.us
 target.de www.target.de;

 rewrite ^/index.htm$ /index.php last; 
 rewrite ^/index.html$ /index.php last; 
 rewrite ^/members/uploads/([a-z0-9_]+)/([-a-z_]+)__(.*)$ /members/uploads/$1/_$3 last; 
 rewrite ^/members/uploads/([a-z0-9_]+)/([-a-z_]+)_(.*)$ /members/uploads/$1/$3 last;
 rewrite ^/([-a-z_]+).html$ /keyword.php?keyword=$1 last;
 rewrite ^/gallery_photo_([a-z]+)_([0-9]+)_([0-9]+).html$ /gallery_photo.php?l=$1&gender=$2&page=$3 last;
 rewrite ^/view_([a-z]+)_([0-9]+).html$ /view.php?l=$1&id=$2 last;
 rewrite ^/paypalok_([a-zA-Z0-9]+)_([a-zA-Z0-9]+)_([a-zA-Z0-9]+).html$ /paypalok.php?id=$1&package=$2&magic=$3 last;

 root /home/target/public_html;

 location /members/ {
 location ~ \.(php|php3|php4|php5)$ {
 deny all;
 }
 location ~ \.(jpg|png|gif|bmp|css|js)$ {
 expires 30d;
 }
 }

 location /admin/ {
 rewrite ^(.*).zip$ $1.php last;

 location ~ \.php$ {
 access_log /var/log/nginx/www.IK.admin.access.log main;
 include proxy_params;
 }
 }

 location /phpMy777/ {
 alias /srv/www/htdocs/phpMy777/;
 index index.php index.html index.htm;
 }

 location = /upload_progress {
 upload_progress_header APC_UPLOAD_PROGRESS;
 report_uploads upload;
 }
 location ~ /upload\.php$ {
 access_log /var/log/nginx/www.IK.uploads.log main;
 include proxy_params;
 upload_progress_header APC_UPLOAD_PROGRESS;
 track_uploads upload 30s;
 }

 location ~ \.php$ {
 access_log /var/log/nginx/www.IK.php.access.log main;
 include proxy_params;
 }

 # ngix statistic
 location = /nginx-stat {
 stub_status on;
 access_log off;
 allow 188.40.*.*;
 allow 127.0.0.1;
 allow 46.4.*.*;
 deny all;
 }

 # redirect server error pages to the static page /50x.html
 #
 error_page 500 502 503 504 /50x.html;
 location = /50x.html {
 root /srv/www/htdocs/;
 }

 error_page 404 /404.html;
 location = /404.html {
 root /srv/www/htdocs/;
 }

 # deny access to .htaccess files, if Apache's document root
 # concurs with nginx's one
 #
 location ~ /\.ht {
 deny all;
 }
 }
 }
 
Ответить с цитированием