apache - configure URL access control for domains using .htaccess or other methods -


i having scenario following:

for example,i have website http://www.mywebsite.com, , have setup subdomain http://image.mywebsite.com. in apache virtual host setting, using same folder (e.g. /home/mywebsite/). (these 2 domains have different bandwidth setup using mod_cband).

i have subfolders "/home/mywebsite/files/images", want make accessible subdomain "http://image.mywebsite.com/files/images/..." not "http://www.mywebsite.com/files/images/..."

how shall configure .htaccess file or other equivalent methods?

thanks guys

since use same directory way can via rewriterule main domain. put in file called .htaccess in root of website.

options +followsymlinks -multiviews rewriteengine on # if request www.example.com ... rewritecond %{http_host} ^www\.example\.com$ [nc] # ... , url starts files/images, deny access ([f] = forbidden) rewriterule ^files/images - [f] 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -