Reputation: 163
I have URL like www.yoursite.com/watch?v=OYQ3svsQ8Ys
and want to redirect it to www.yoursite.com/index.php?v=OYQ3svsQ8Ys
Actually Question mark makes problem I am trying :
<ifModule mod_expires.c>
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteCond %{QUERY_STRING} ^v=([^&]+) [NC]
RewriteRule ^watch$ index.php? [NC,L,QSA]
</ifModule>
Upvotes: 0
Views: 462
Reputation: 26153
The only error in your file is if content <ifModule mod_expires.c>
. Change it to rewrite
<ifModule mod_rewrite.c>
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteCond %{QUERY_STRING} ^v=([^&]+) [NC]
RewriteRule ^watch$ index.php? [NC,L,QSA]
</ifModule>
Upvotes: 1