Print Page | Close Window

Create a page with password and video

Printed From: openElement Website
Category:

openElement


Forum Name: openElement General Discussion
Forum Description: A place for general discussion and questions about the software.
URL: https://forums.openelement.uk/en/forum_posts.asp?TID=1736
Printed Date: Apr 20 2024 at 11:56am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Create a page with password and video
Posted By: WattJet
Subject: Create a page with password and video
Date Posted: Sep 06 2020 at 5:40pm
Hi,

I want to create a page that can only be accessed with password.
The page will have a video.

Questions:
  • Page: The hosting suggested to create a subdomain with one page and the video, and then included the password to access it. Is this the best/easiest way to do it?
  • Video: Is there any way to avoid that the video is downloaded (or is only downloaded with another password)?
Thanks



Replies:
Posted By: Hobby001
Date Posted: Sep 06 2020 at 7:00pm
Originally posted by stackoverflow stackoverflow wrote:

If you are using PHP, the best way is to control it the .htaccess, you need to put your files, images and videos under consideration in a separate folder/directory, and create a new .htaccess file in this directory with the below:

RewriteEngine On
RewriteCond %{REQUEST_URI} \.(mp4|mp3|avi)$ [NC]
RewriteCond %{HTTP_REFERER} !^http://sample.com/.*$ [NC]
RewriteRule ^.* - [F,L]

The first line %{REQUEST_URI} will prevent getting the file through the web browser or through curl. The second line %{HTTP_REFERER} will prevent accessing the image/video using HTML tags <img> or <video> from any website except the exception ! you provide instead of http://sample.com/ which usually should be your website itself.

You can also have a look at my question and the accepted answer  https://stackoverflow.com/questions/43951871/allowing-video-to-be-played-in-video-element-from-my-website-but-not-allowing" rel="nofollow - here  for more tricks on the browser side.


https://stackoverflow.com/questions/1294501/how-to-prevent-downloading-images-and-video-files-from-my-website" rel="nofollow - https://stackoverflow.com/questions/1294501/how-to-prevent-downloading-images-and-video-files-from-my-website

Create a new php page and add the packs (UserSpace01) to your site to manage password protection.




-------------
https://denislafrance.net/index.en.php" rel="nofollow - https://denislafrance.net https://www.youtube.com/playlist?list=PLWg7A6YtIr7WE2oJe9pX8_3u0FerqJwjo" rel="nofollow - , OE training video


Posted By: Hobby001
Date Posted: Sep 06 2020 at 7:01pm
Allways make a full project backup prior to modify your site.

-------------
https://denislafrance.net/index.en.php" rel="nofollow - https://denislafrance.net https://www.youtube.com/playlist?list=PLWg7A6YtIr7WE2oJe9pX8_3u0FerqJwjo" rel="nofollow - , OE training video


Posted By: WattJet
Date Posted: Sep 06 2020 at 7:26pm
Many thanks!. I'll start working on it


Posted By: WattJet
Date Posted: Sep 07 2020 at 4:34pm

So, to make my life easier ( and the overall touch & feel consistent) I was considering to make this new page with the video based on one of the pages of the actual site.

 I have created a subdomain AND a new subdirectory in which this new video “page” will be saved. In this way, the regular site and this one for the video will remain completely independent and whatever I do here will not affect the regular site or saved info. The site would remain as it is now (mydatamygain.com) and the subdomain would be MDMGVideo.mydatamygain.com

 The page should have the same  touch&feell as the standard site, so I thought I could use the structure of the "News" page  I created based on the the sensode black template https://mydatamygain.com/actualites.htm , but with only one set of the sequence "anchor - FENETRE_MODAL -cadre"

I would keep all the rest of the components -including the top menu and the languages-, and I would ensure that those links are directed to the regular page https://mydatamygain.com.

I order to include the modifications in the htaccess that you recommend, the first step -I think- is to know what should go in that subdomain and subdirectory to achieve the above.

 So, Can I make a copy of the existing site, pass it to the subdiretory,  delete all unnecessary files and keep just the actualites page –rename it to become then the new index page (for the video) and then modify the access file as you suggest?

 I am sure that the above description is too crude, but something around that idea should be possible?
Any guidance will be more than welcome




Posted By: Hobby001
Date Posted: Sep 07 2020 at 6:24pm
The new page does not need to be an index.htm page.

You can use OE site explorer to create the new sub-directory.  Then duplicate the news page and move the duplicate into the new directory allways using OE's site explorer.  Therefore all OE utilities will know about this page and will be able to handle it.

On the server side, your sub domain must be assigned to your subdirectory.  



-------------
https://denislafrance.net/index.en.php" rel="nofollow - https://denislafrance.net https://www.youtube.com/playlist?list=PLWg7A6YtIr7WE2oJe9pX8_3u0FerqJwjo" rel="nofollow - , OE training video


Posted By: WattJet
Date Posted: Sep 07 2020 at 8:09pm
So I created a folder -within oe site explorer- , cloned the actualites page, renamed it as video and put it in that folder.
Then within that page got rid of everything except one cycle of anchor - FENETRE_MODAL -cadre. I got rid of the columns and only left the space and there I pasted a Video HTML 5 element.

I uploaded the video to Project - Resources - Video files and the Video works well.

Questions:
  1. What size should the window have? I put 960w x 640H, and the video itself at 100% but I do not know how will that work in Mobile.
  2. I cannot find how to point this folder to a new subdirectory on the server side. This is that I have the subdirectory created in the server, I have also created the subdomain.
I can point the subdomain to the specific subdirectory in the server but I do not know how to "tie" the other two since from what I see, the video is a resource -therefore saved in the same Files(Image, Media, Video)  folder of the oe site file, and I cannot find how to point this particular folder to the subdirectory in the server.

Once I have that solved, I will start trying to make the password access and no download limitation.
Again thanks so much for all your guidance



Posted By: Hobby001
Date Posted: Sep 07 2020 at 8:46pm
Use this element instead  https://denislafrance.net/Element/ResponsiveHTML5Video.en-us.htm" rel="nofollow - https://denislafrance.net/Element/ResponsiveHTML5Video.en-us.htm

use the Edit Media utility to fix the width for each proposed media.


https://zupimages.net/viewer.php?id=20/37/gtc7.png" rel="nofollow">


-------------
https://denislafrance.net/index.en.php" rel="nofollow - https://denislafrance.net https://www.youtube.com/playlist?list=PLWg7A6YtIr7WE2oJe9pX8_3u0FerqJwjo" rel="nofollow - , OE training video


Posted By: WattJet
Date Posted: Sep 07 2020 at 9:12pm
Thanks for that Hobby001

I had it already installed and running with the video adaptatif (you mentioned the element in previous posts)

I am sorry to insist in the other question.

How do I point the Video folder that I created within the project  to a different subdirectory in the server?

Thanks again for all your guidance


Posted By: Hobby001
Date Posted: Sep 07 2020 at 9:52pm
When you select the video file check External URL and point to your file

-------------
https://denislafrance.net/index.en.php" rel="nofollow - https://denislafrance.net https://www.youtube.com/playlist?list=PLWg7A6YtIr7WE2oJe9pX8_3u0FerqJwjo" rel="nofollow - , OE training video


Posted By: WattJet
Date Posted: Sep 07 2020 at 11:11pm
So, I tried the following two avenues for this subdirectory subdomain issue.

Before that, I'll describe how are the files organized:

The main project (based on sensodeblack template) is saved under one folder that has all the files, pages (Home, actualites, FAQ,) etc.

Within that folder, I created another folder (Video). Within the Video folder, I placed the page "Video", which was cloned from the actualites page.  Within the Video page, I installed the HTML5 adaptatif  element.  I have tried this page within oe and it works perfectly.

If one goes to the windows file explorer one can see that the project has all the folders (Backup, Common, Data, Files, Garbage, scrolltop,Templates, WEFiles) AND the new folder Video that I created. The video folder has only the .htm files for the different languages, Video(var).js; Video(var).php; Video.css;Video.dat

I have already a subdomain (mdmgvideo.mydatamygain.com) that is pointed to the subdirectory in the server "/*****/Video".  I have verified with my hosting provider that the subdomain is well pointed to the subdirectory.

If I type in the browser: mdmgvideo.mydatamygain.com I get the Error 403 forbidden error
If I type in the browser: https://www.mdmgvideo.mydatamygain.com I get a caution security risk message

My hosting provider says that although the subdomain is well pointed, the fact that in that folder/subdirectory there is no index.htm file makes it impossible to work.


Any guidance on how to continue?






Posted By: Hobby001
Date Posted: Sep 07 2020 at 11:24pm
If you try https://www.mdmgvideo.mydatamygain.com/Video.htm, you get a security error message because you don't have an ssl certificate associated with it.  






-------------
https://denislafrance.net/index.en.php" rel="nofollow - https://denislafrance.net https://www.youtube.com/playlist?list=PLWg7A6YtIr7WE2oJe9pX8_3u0FerqJwjo" rel="nofollow - , OE training video


Posted By: WattJet
Date Posted: Sep 07 2020 at 11:26pm
Yes, that is right, but if I type mdmgvideo.mydatamygain.com, it shows me access forbidden because it does not find the index files.
I have ssl for the domain, but not for the subdomain.


Posted By: Hobby001
Date Posted: Sep 07 2020 at 11:26pm
http://www.mdmgvideo.mydatamygain.com/Video.htm gives you direct access to it

-------------
https://denislafrance.net/index.en.php" rel="nofollow - https://denislafrance.net https://www.youtube.com/playlist?list=PLWg7A6YtIr7WE2oJe9pX8_3u0FerqJwjo" rel="nofollow - , OE training video


Posted By: WattJet
Date Posted: Sep 07 2020 at 11:46pm
I try to type http (without the "s", but all my browsers -firefox, edge, chrome- try to access https, and I get security error



Posted By: Hobby001
Date Posted: Sep 08 2020 at 1:03am
Right, I could access once, now I can't

-------------
https://denislafrance.net/index.en.php" rel="nofollow - https://denislafrance.net https://www.youtube.com/playlist?list=PLWg7A6YtIr7WE2oJe9pX8_3u0FerqJwjo" rel="nofollow - , OE training video


Posted By: Hobby001
Date Posted: Sep 08 2020 at 1:06am
The suggestion on stackoverflow was talking about a subdirectory, not a sub domain.  

Why did you choose to use a subdomain?




-------------
https://denislafrance.net/index.en.php" rel="nofollow - https://denislafrance.net https://www.youtube.com/playlist?list=PLWg7A6YtIr7WE2oJe9pX8_3u0FerqJwjo" rel="nofollow - , OE training video


Posted By: Hobby001
Date Posted: Sep 08 2020 at 2:29am
Finally I could make some tests on this solution and could not make it work.

The htaccess stuff prevent from playing the video but not to download it


-------------
https://denislafrance.net/index.en.php" rel="nofollow - https://denislafrance.net https://www.youtube.com/playlist?list=PLWg7A6YtIr7WE2oJe9pX8_3u0FerqJwjo" rel="nofollow - , OE training video


Posted By: Hobby001
Date Posted: Sep 08 2020 at 2:34am
I found another solution to prevent download:

Add the following code in an html code block in header position

<body oncontextmenu="return false;">

And protect your page with a password by using the packs as I mentioned earlier


-------------
https://denislafrance.net/index.en.php" rel="nofollow - https://denislafrance.net https://www.youtube.com/playlist?list=PLWg7A6YtIr7WE2oJe9pX8_3u0FerqJwjo" rel="nofollow - , OE training video


Posted By: Hobby001
Date Posted: Sep 08 2020 at 2:48am
After more readings I<m not sure on how much it protect

You have to do your own search


-------------
https://denislafrance.net/index.en.php" rel="nofollow - https://denislafrance.net https://www.youtube.com/playlist?list=PLWg7A6YtIr7WE2oJe9pX8_3u0FerqJwjo" rel="nofollow - , OE training video


Posted By: WattJet
Date Posted: Sep 08 2020 at 3:40pm
Hi again Hobby001

Thanks again for your answers and your research yesterday. I apologize if I did not respond on the spot, but it was +2AM here

Regarding the overall configuration, I must have interpreted or understood wrongly about the need of a subdomain.  I have taken that out, placed the files etc just in a sub-directory and now the access is direct
https://mydatamygain.com/MDMGVideado/Video.htm  The video and page can be accessed with no problem.

Regarding the two original questions (how to require a password, and how to avoid an easy download of the video), I just want that, this is, to avoid an easy and automatic access and/or download of the video.

I know that anyone really willing to download it will be able to do so, but I just want to avoid an easy access.

In any case, thank you so much for dedicating time to research the issue and convey the solutions and for all your support.







Posted By: Hobby001
Date Posted: Sep 08 2020 at 8:23pm
I might get some time available to look after it later today.

The password protected page is available if you use the packs


-------------
https://denislafrance.net/index.en.php" rel="nofollow - https://denislafrance.net https://www.youtube.com/playlist?list=PLWg7A6YtIr7WE2oJe9pX8_3u0FerqJwjo" rel="nofollow - , OE training video


Posted By: WattJet
Date Posted: Sep 08 2020 at 10:09pm
I erased previous entry since after the recentering the video, I was able to move the UserSpace1 #50 pack to the video page. 

It requests to direct to a login page. Is there any template for the login form page available?


Posted By: Hobby001
Date Posted: Sep 09 2020 at 1:18am
This piece of code added into an html code block in header position will prevent easy download

<body oncontextmenu="return false;">


-------------
https://denislafrance.net/index.en.php" rel="nofollow - https://denislafrance.net https://www.youtube.com/playlist?list=PLWg7A6YtIr7WE2oJe9pX8_3u0FerqJwjo" rel="nofollow - , OE training video


Posted By: WattJet
Date Posted: Sep 09 2020 at 2:39pm
Thanks!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net