How to lock .XML file accessibility

  • I've this :

    Apache Configuration
    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 http://www.site.com/tour.xmland you click on it, you will see an 403 Error.

    Now write http://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*

    Edited once, last by kealkeal (October 31, 2014 at 10:19 AM).

  • 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.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!