You are not logged in.

1

Thursday, October 30th 2014, 4:22pm

How to lock .XML file accessibility

Hi,

I'd like to "lock" the .XML file.

I know that we need to include this file to embed Panormaic view and that file can be crypt.

But I' like redirect the visitor if he put this www.site.com/tour.xml into the web Browser to www.site.com

I know that .htaccess file can do lots of thing but I don't know how .. *confused*

Thanks for your help. *smile*

2

Thursday, October 30th 2014, 5:59pm

I've this :

Source code

1
2
3
4
5
6
7
RewriteEngine On
#Empêche ces types de fichiers d'être servis
#Renvoie une erreur 403 si de tels fichiers sont demandés
#Autorise l'acces par fichier php si le REFERER est correctement renvoyé par le serveur
ErrorDocument 403 /403.asp
RewriteCond %{HTTP_REFERER} !^http://www.monsite.com [NC]
RewriteRule ^.*\.xml$ /foo [F]

It works if you creat a link like this www.site.com/tour.xmland you click on it, you will see an 403 Error.

Now write www.site.com/tour.xml into your internet browser and you will see the tour.xml file ... *blink* Refresh your internet browser and you will see an 403 error ... *unsure* *cursing* *unsure*

Someone can help me ?? *smile*

This post has been edited 1 times, last edit by "kealkeal" (Oct 31st 2014, 10:19am)


3

Friday, October 31st 2014, 10:19am

No idea ?? *cry*

Klaus can you check this please ?

Posts: 1,850

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

4

Friday, October 31st 2014, 11:54pm

Use private encryption and use a krpano swf with javascript interface disabled.

Using the HTTP_REFERER is very poor security since it's client based and completely under client control.

One problem with your post, is that it is very hard to understand. So maybe that is why there were no replies.

Use encryption instead and forget that method you want since you have no idea how it will affect all browsers and devices or adblocks etc.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour