On my Prestahsop website I often udes embed youtube video, so that means http://www.youtube.com... But now I want to all be and I don't know if I can automatically redirect all those calls (.htaccess ?). thanks for any help !
-
Please clarify your question. What have you done so far to achieve your goal?– WebdesignerOct 3, 2017 at 21:12
-
So actually on my website there are several dozen of calls like <iframe src="youtube.com/embed/KxDSEnWVttI" width="300" height="300"></iframe> I don't want to change them one after another, so I woudl like to redirect automatically to httpS://www.youtube.com.– PatOct 4, 2017 at 8:06
1 Answer
Redirecting/Rewriting is something only for request that coming to your server e.g. you want to change a request example.com/this-page
to example.com/that-page
.
You can't redirect an external URL. The only thing that you can do, if applicable, is to change the output. So if you have any kind of CMS or PHP Framework you can search through your output looking for <iframe src="http://youtube.com/ ...
and change it to <iframe src="https://youtube.com/ ...
before you send it to the browser.
If you have Static HTML than you have to do this in one editor were you can find and replace with regular Expressions on multiple files.