I need to make a redirect from an old url to a new url. The problem is that both urls have a space : The problem is that apache doesn't recognize space as %20 or escaped with "\" For example the http:\\protocols eib.php Code (markup): I want to redirect to http:\\automation protocols.php Code (markup): .
RewriteEngine on RewriteRule ^protocols\ eib\.php$ /automation\ protocols.php [R=301,L] Code (markup): That should do the trick.
It give 500 error I tried something like this: RewriteEngine On RewriteRule ^Firewall/VPN\ Firewall/firewall-vpn-introduction-1\.php$ /Automation-Computer-Security/computer\ gadgets/computer-security/intranet-vpn\.php [L,R=301] Code (markup):
Did you have the RewriteRule all on one line? Do you have mod_rewrite installed on the server? The following works on my server: RewriteEngine on RewriteRule ^Firewall/VPN\ Firewall/firewall-vpn-introduction-1\.php$ /Automation-Computer-Security/computer\ gadgets/computer-security/intranet-vpn.php [L,R=301] Code (markup):
Thank you. I think the problem was that I used Notepad to edit .htaccess and the RewriteRule weren't RewriteRule all on one line.(Notepad wrap the lines)