Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8941351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:16:45+00:00 2026-06-15T11:16:45+00:00

I have two domains both pointing to /var/www : www.example.com : main domain, has

  • 0

I have two domains both pointing to /var/www:

  • www.example.com: main domain, has cookies
  • static.example.com: cookie-less domain for static content

I now want to free the static.example.com domain from cookies using .htaccess using following lines:

RequestHeader unset Cookie
Header unset Set-Cookie

My problem:

Since both domains share one .htaccess file: How do I make sure these lines only apply to static.example.com?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T11:16:46+00:00Added an answer on June 15, 2026 at 11:16 am

    You have several options. Let me show some in order of my preference:

    1) create dedicated folder for each domain, your server serves. Then you can also configure each in different way.

    2) set cookies correctly. Browser will append cookies only to requests for correct domain – so don’t set cookie domain example.com but use www.example.com and do domain name normalization of your requests – so redirect permanently all requests to http://example.com to http://www.example.com

    3) unset specific cookie using mod_rewrite using the CO switch. For more details see this question.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two domains for example www.male.com and www.female.com which both point to the
We have two domains, www.aaa.com and www.bbb.com. Both point to the same root directory
E.g. I have two domains: http://www.computer.com http://www.computers.com http://www.computer.com is main website and http://www.computers.com is
I have code seperated in two domain. Both domains and code is trusted. I
I have a website which has two domains added. Both domains point to the
I have two domains abc.com and xyz.com in one server,both have the exact code.The
I have a domain domain.com and subdomain sub.domain.com Those two domains have different ftp
I have web application and two domains for it - example.com and example.ru example.com
I have two domains: mydomain.com and mydomain.fr They both correspond to the same IP
I have a .net webapplication with the following domains: www.domain.com sub.domain.com files.domain.com When a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.