Jump to content

htaccess for cookieless domain


dpacmittal

Recommended Posts

I made a CNAME static.mysite.com and pointed it to www.mysite.com. This is basically to create a cookieless domain. Now I don't want anything other than javascript, css and pictures to be served from static.mysite.com. I almost wasted one hour figuring out what htaccess would suffice this. I've got the logic but I am not able to implement it.

 

Basically, if the HOST header has static in it, then allow only above-specified filetypes and give a 403 on the other pages.

If the HOST header doesn't contain 'static' in it, then its normal domain and should allow access to everything.

 

I hope I am clear.

Can you guys help me with this?

Link to comment
https://forums.phpfreaks.com/topic/209875-htaccess-for-cookieless-domain/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.