Magento的媒体URL - 摆脱403禁止 [英] Magento media url - get rid of 403 Forbidden
问题描述
在我的Magento站点(不是真正的URL;)),我有 HTTP://magento.local。 COM /媒体/ 返回为403禁止。
on my Magento site (not the real url ;) ), I have http://magento.local.com/media/ returning as a 403 Forbidden.
这似乎是所有Magento的安装标准,但我想改变这一点,并没有对请求/媒体/.
This seems to be standard for all Magento installs, but I want to change this, and not have a 403 returned for requests to /media/.
我怎样才能做到这一点?
How can I do this?
编辑:(加入对它的进一步的信息和理由)
(adding further information and reason for it)
我想/媒体/不成为一个403,这样我就可以将请求重定向到/媒体/到/media/index.html。
I want /media/ to not be a 403, so that I can redirect requests to /media/ to /media/index.html.
我想这重定向很容易,一旦403得到了解决,但不幸的是事实并非如此。例如
I thought this redirect would be easy once the 403 was resolved, but unfortunately it is not. e.g.
RewriteRule ^$ /index.html [L,NC,R=301]
显示不重定向/媒体/可言,而通常的/索引。
does not redirect /media/ at all, and the usual "Index of /" is displayed.
解决方案:增加的DirectoryIndex到htaccess文件
SOLUTION: add DirectoryIndex to the htaccess file
谢谢
保罗
推荐答案
将的.htaccess
你的媒体/
目录与内容如下:
Put .htaccess
to your media/
dir with following contents:
Options All +Indexes
DirectoryIndex index.html
这篇关于Magento的媒体URL - 摆脱403禁止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!