.htaccess URL redirect

后端 未结 3 1368
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-04 04:20

How can I redirect http://domain.com/blog/index.php/weblog/rss_2.0/ to http://www.domain.com/feed/ with .htaccess?

The website has 3 domains pointing to it and all

3条回答
  •  孤街浪徒
    2020-12-04 04:53

    You could utilise mod_rewrite.

    RewriteEngine On
    RewriteRule ^blog/index\.php/weblog/rss_2\.0/$ /feed/ [R=302]
    

    That should forward the URL to /feed/ on the same domain as the request came in on. Once you're happy it's working you can change the 302 to 301.

提交回复
热议问题