http://example.com/upload/aaa.jpg to
http://example.com/asset/example.com/aaa.jpg
~~
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$
RewriteRule ^upload/(.*)$ asset/%1/$1 [L]
它有效,但我只想让example.com中的ppl直接访问
http://example.com/asset/example.com/aaa.jpg
eg: http://aa.com only can access
http://aa.com/asset/example.com/xxxx.jpg
我该怎么做?
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /asset/sss.ssss.com/
RewriteCond %{HTTP_HOST} !^sss\.ssss\.com$ [NC]
RewriteRule ^ - [F]
这是我的解决方案