htaccess redirect from wordpress page to a php page
- by JustAnil
I have recently had to change a URL on a website (in PHP on Apache).
The old URL is: http://content.mywebsite.org.uk/hidden/discounts/
When a user visits the above link.
The new URL is: http://www.mywebsite.org.uk/charity_benefits.php
I have tried variants of the following (and some others), but its just not working for me.
RewriteCond %{REQUEST_URI} ^/hidden/discounts/$ [NC]
RewriteRule ^/hidden/discounts/$ /charity_benefits.php [R=302,L,NC]
I need the redirect to redirect to www mywebsite.org.uk. (Notice the www! Its important!).
So basically, a simple redirect from the old page to the new page. (Which are on different subdomains (OLD: content., NEW: www.) which are hosted on the same server).