I have 2 hostings in one account with GoDaddy.
One hosting I use for my Wordpress website, and second hosting I use to keep my files related to website, to increase speed or performance.
But for the files in second account, I want to access only if request came from my first hosting or the website.
I searched couple of websites, and they suggested me that by using htaccess
I can make it happen. But unfortunately none of them working. Some examples I am mentioning below.
RewriteEngine on
RewriteCond %{HTTP_REFERER}!^https://thefreetools.com [NC]
RewriteCond %{HTTP_REFERER}!^http://www.thefreetools.com [NC]
RewriteRule .*\.(jpg¦zip¦js¦txt)$ - [F,NC]
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^https://(www\.)?thefreetools[NC]
RewriteCond %{HTTP_REFERER} !^https://(www\.)?thefreetools.*$ [NC]
RewriteRule \.(gif|zip|png|js|css|bmp|exe|rar)$ https://thefreetools.com[R,L]
Or can I make it happen by manuplating DNS records of my GoDaddy Hosting.
PLEASE NOTE :- I AM USING SSL ON MY WEBSITE, SO URL STARTS WITH HTTPS