Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.