Cristi Popescu
Cristi Popescu

Reputation: 29

Use mp4 files from 1 site to anoter site hosted on the same server with htaccess

I have 2 videos sites on the same server and site 1 is already populated with video files. Its there a way to use the video files via htaccess from site 1 to site 2 without copying all the video files?

site1.com/media/video.mp4

site2.com/media/video.mp4

Upvotes: 2

Views: 29

Answers (1)

Pedro Lobito
Pedro Lobito

Reputation: 98961

You can use something like the this on .htaccess:

Options +FollowSymLinks
RewriteEngine On
RewriteRule ^/?media/(.*)$ http://www.site2.com/media/$1 [R=301,L]

Or simply:

Redirect 301 /media http://www.site2.com/media

Upvotes: 4

Related Questions