nginx 某个url或者url下面的图片不能访问就跳到指定的url
2011-05-31 08:32
579 查看
server_name house.xaklc.com;
index index.php index.html index.htm;
root /data1/web1site/web/house;
location ~ ^/attachments/.*\.(php|php5)$
{
deny all;
}
location ~ ^/data/.*\.(php|php5)$
{
deny all;
}
location ~* ^/attachments/.*\.(jpg|gif|bmp|jpeg|png)$ {
if (!-e $request_filename) {
rewrite ^/(.*) /static/images/nophotosmall.gif last;
}
}
http://house.xak1c.com/attachments/****/***/*** 图片类型的文件不能访问均跳到 http://house.xak1c.com/static/images/nophotosmall.gif
index index.php index.html index.htm;
root /data1/web1site/web/house;
location ~ ^/attachments/.*\.(php|php5)$
{
deny all;
}
location ~ ^/data/.*\.(php|php5)$
{
deny all;
}
location ~* ^/attachments/.*\.(jpg|gif|bmp|jpeg|png)$ {
if (!-e $request_filename) {
rewrite ^/(.*) /static/images/nophotosmall.gif last;
}
}
http://house.xak1c.com/attachments/****/***/*** 图片类型的文件不能访问均跳到 http://house.xak1c.com/static/images/nophotosmall.gif
相关文章推荐
- nginx 禁止访问配置,指定URL地址指定IP允许访问
- IE6 jQuery.ajax 不能访问服务器(未执行URL指定的java处理类)
- nginx配置访问指定图片路径方法
- nginx根据访问的url参数或者是请求 头部做判断转发
- nginx 配置后网站图片或js 加载出来一半或者不出来刷新才可以,chrome 浏览器访问项目时加载大文件失败 ERR_CONTENT_LENGTH_MISMATCH:
- "为帮助内容存储区指定的位置无效或者您无权访问该位置"解决方法
- nginx中对指定的IP不使用密码对区域外IP使用密码访问
- jeecms内存溢出问题的解决和中文图片不能访问的问题
- 阿里云 解决为什么不能使用公网IP地址访问部署的nginx项目
- Linux下定时切割Nginx访问日志并删除指定天数前的日志记录
- img标签不能访问本地图片
- c#操作word 在指定书签插入文字或者图片(转)
- 在Silverlight中读取指定URL图片包数据
- nginx、TP框架实现兼容pathinfo和rewrite两种url访问方式
- windows7 或者 windows server 2008图片不能预览设置
- 在haproxy+nginx+php-fpm环境下访问网站URL被自动加上了nginx服务的私网端口号的故障分析
- Nginx图片及样式文件不记录访问日志
- LINUX下用apache或者nginx,本机可以访问,但局域网中的电脑无法访问
- centos7 nginx图片 服务器可以访问ftp用户上传的图片资源的配置
- FastDFS结合Nginx插件实现图片http访问