问题描述
我有一个Joomla安装在我的/ home /的Joomla目录。我安装Apache和Lighttpd的我已经配置Lighttpd的代理只静态文件,lighttpd的侦听端口81。现在,我想是
I have a joomla setup in my /home/joomla directory.I installed both Apache and Lighttpdi have configured Lighttpd to proxy only static files, and lighttpd is listening on port 81.Now what i want is
每当请求静态文件是由,而不是去
whenever request for static files are made, instead of going to
www.domain.com/whatever/bg.jpg
它应该重定向到
domain.com:81/whatever/bg.jpg
使用的.htaccess
using .htaccess
还注意到,www.domain.com更改为domain.com
also notice that www.domain.com changed to domain.com
请请我需要一个快速的帮助吧:)
please please i need a quick help for it :)
推荐答案
好吧,我找到了方向:)
Alright i found out the way :)
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule \.(jpg|jpeg|png|gif|css)$ http://domain.com:81/$1 [P,QSA,L]
学到了很多关于htaccess的文件在一天:)
Learned a lot about htaccess files in one day :)
这篇关于的.htaccess改写到另一个端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!