开发者

Strip URL - PHP or .htaccess

开发者 https://www.devze.com 2023-03-26 17:22 出处:网络
I have two pages on my site http://www.strictlyrandl.com/strictly-reading-festival/ http://www.strictlyrandl.com/strictly-leeds-festival/

I have two pages on my site

  • http://www.strictlyrandl.com/strictly-reading-festival/
  • http://www.strictlyrandl.com/strictly-leeds-festival/

I used to have

  • http://www.strictlyreading.co.uk
  • http://www.strictlyleeds.co.uk

I did a redirect with my registrar so strictlyreading.co.uk would go to the relevant page on strictlyrandl.com and similar with Leeds.

However when someone goes to somethin开发者_JAVA百科g like strictlyreading.co.uk/page-name they get redirected to strictlyrandl.com/strictly-reading-festival/page-name rather than just strictlyrandl.com/strictly-reading-festival

Is this best done using .htaccess or PHP? Any example would be great It has to be done at strictlyrandl.com


use a .htaccess rewrite rule RewriteRule (.*) http://www.strictlyrandl.com/strictly-reading-festival/$1 [R=301,L]

0

精彩评论

暂无评论...
验证码 换一张
取 消