.htaccess - Two rewrites to the same location

Soldato
Joined
27 Dec 2005
Posts
17,296
Location
Bristol
I've got a page that displays a YouTube video and we pass the info via the YouTube ID in the URL, for example domain.com/w/BzMLA8YIgG0. It passes through as GET as follows:

Code:
if(isset($_GET['v'])){
$v = $_GET['v'];

The existing rewrite rule is:

Code:
RewriteRule ^w/(.*)$ watch/?v=$1

I also want the following, but it appears they clash as I get a 500 Internal Server Error.

Code:
RewriteRule ^watch/(.*)$ watch/?v=$1
 
Back
Top Bottom