Reputation: 868
I want to redirect the url of http://sitename/modules/fb/fb.php
to http://sitename/modules/take_control
.How can i do that using htaccess
I tried like
RewriteRule ^/?modules/fb/fb\.php$ take_control
, Is that right ?
Upvotes: 0
Views: 21
Reputation: 24448
Your solution is the opposite of what you most likely want if you are trying to rewrite to take_control.
Give this a try. These rules should provide the rewrite with take_control
as the URI both ways.
RewriteEngine on
RewriteCond %{THE_REQUEST} ^GET\ /+modules/fb/fb\.php [NC]
RewriteRule ^ /take_control/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^take_control/?$ /modules/fb/fb.php [L]
Upvotes: 2