Reputation: 26565
In my blog site there are almost 150 pages and I need to redirect only 2 pages to another websites's pages. I don't need a rewrite rule but I need to redirect ONLY these 2 pages.
I tryed this but doesn't work:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule http://www.site1.com/aaa.php http://www.site2.com/111.php [R=301,L]
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule http://www.site1.com/bbb.php http://www.site2.com/222.php [R=301,L]
</IfModule>
why ?
Upvotes: 0
Views: 50
Reputation: 4440
the first argument of rewriteRule is the path not full Uri
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^aaa\.php$ http://www.site2.com/111.php [R=301,L]
RewriteRule ^bbb\.php$ http://www.site2.com/222.php [R=301,L]
</IfModule>
Upvotes: 2