raksmart活动促销

分享

写回答

发帖

vps用上.htaccess后出大问题了。

国外VPS云主机 国外VPS云主机 3516 人阅读 | 10 人回复

发表于 2009-3-27 09:02:54 | 显示全部楼层 |阅读模式

RewriteEngine on
RewriteCond %{REQUEST_URI} ^/error
RewriteRule ^.*$ - [L]
RewriteCond %{REQUEST_FILENAME} \.(gif|jpeg|jpg|png)$ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !52dxy\.com [NC]
RewriteRule (.*) /error/errorimg.png [R,NC,L]

把上面这个文件上传到防盗链的img图片文件夹里,用的ftp上传,结果传上去后看不到.htaccess这个文件。但是回到页面刷新,生效了。
图片全都看不到了,我直接访问图片路径。

就出现下面这个结果?

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@52dxy.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

我又用ftp上传了一个.css文件到img图片文件夹里,能看到文件,但是把改扩展名为.htaccess后就看不到文件了。

回答|共 10 个

workey

发表于 2009-3-27 09:06:02 | 显示全部楼层

我现在就想知道如何恢复默认的.htaccess
可能每个文件夹里本身就有默认的.htaccess吧,为啥用ftp看到文件里其他文件,就是看不到这个文件呢?

workey

发表于 2009-3-27 09:28:38 | 显示全部楼层

workey

发表于 2009-3-27 09:29:09 | 显示全部楼层

workey

发表于 2009-3-27 10:33:07 | 显示全部楼层

workey

发表于 2009-3-27 10:35:46 | 显示全部楼层

RAKSmart

05191

发表于 2009-3-27 11:29:09 | 显示全部楼层

你是什么VPS?
你这个是什么程序?
你这个htaccess是做啥用?
不好意思,我也是新人,但是你写清楚点,容易让高手来帮你解答

bamboo

发表于 2009-3-27 12:07:54 | 显示全部楼层

直接删除。应该没事。

kingto

发表于 2009-3-27 13:33:44 | 显示全部楼层

xx網站

lenghost

发表于 2009-3-27 23:12:42 | 显示全部楼层

不可能呀,.htaccess文件上传后怎么可能看不到
不好用直接删除行了呢
您需要登录后才可以回帖 登录 | 注册

本版积分规则