开发者

Problem with .htaccess and Flash files

We have a web开发者_高级运维site that we wish to have a "www." version of only, and have non-www. requests re-direct to it's 'www.'-prefixed counterpart. For example, http://example.com re-directs to http://www.example.com etc. This is achieved with the following .htaccess rule:

RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]

However, this is causing a conflict with a bespoke chat client we have had developed.

The bespoke chat client requests asset files, but the license we have is for the non-'www.' domain only. So when I apply the above .htaccess rules, the requests fall over (as the chat client is not detecting the files at the non-'www.' URI).

I've Googled excluding directories from .htaccess rewrite rules and I've placed over-riding .htaccess files in the chat client's directory (/flashcoms) as well as the directory that contains the page, which calls the chat client, to no avail. The requests still fall over.

Has any one had experience with Flashcoms, or come across this problem before? One of the solutions proposed was:

RewriteRule ^(flashcoms)($|/) - [L]

But this did not work. Any help...?


Where did you place this in your file?

RewriteRule ^(flashcoms)($|/) - [L]

Needs to be BEFORE

RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜