0

I've a web app served by Apache, html pages sent to browsers include several CSS files that are hosted at same web app domain.

I've noticed some websites use my css (and images) including in their pages but this increase my (limited) Apache server traffic.

I want to allow css access only for pages hosted at specific domain(s).

How can I configure the web server (Apache) to refuse serving css outside specific domain(s)?

Example (valid access)

myhost.com/index.html contains inclusion for styles/mystyles.css

Example (invalid access)

foreignhost.com/index.html contains inclusion to myhost.com/styles/mystyles.css

1 Answer 1

3

Hotlinking can be prevented with .htaccess files, but it might be more fun to change the URL of your CSS files and put up a file at the old URL that makes their entire site hot pink.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.