htaccess从WordPress页面redirect到一个PHP页面
我最近不得不改变一个网站上的URL(在Apache上的PHP)。 旧的url是: http://content.mywebsite.org.uk/hidden/discounts/ : http://content.mywebsite.org.uk/hidden/discounts/ 当用户访问上述链接。 新的URL是: http://www.mywebsite.org.uk/charity_benefits.php : http://www.mywebsite.org.uk/charity_benefits.php 我尝试了以下(和其他一些)的变体,但它只是不为我工作。 RewriteCond %{REQUEST_URI} ^/hidden/discounts/$ [NC] RewriteRule ^/hidden/discounts/$ /charity_benefits.php [R=302,L,NC] 我需要redirect到www mywebsite.org.uk。 (注意www !它的重要!)。 所以基本上,从旧页面到新页面的简单redirect。 (位于同一服务器上的不同子域(OLD: content. ,NEW: www. ))。