Now i want to track my page with an analytic-tool - this is functional with this structure:
- i only share links on the internet with the url to e.g. "domain.org/img/1.jpg"
Now i want to fix this problem with mod_rewrite, that on demand of e.g. "data.domain.org/img/1.jpg" the user gets redirected to "domain.org/img/1.jpg" - then the 404.php gets included and the anayltic-tool tracks this visitor - to exit the loop mod_rewirte should only fire on a referer that is not domain.org.
This is my test-code in .htaccess (without referer-check but thats simple, i hope )
- Code: Select all
Redirect 301 /http://data.domain.org/* http://domain.org/*
Easy code, but this is only functional on links, they're not exists. How i can realize, that mod_rewrite forces redirecting, so long the referer is not domain.org?
My problem simply described:
Thanks in advance!