.htaccess URL redirect

后端 未结 3 1357
佛祖请我去吃肉
佛祖请我去吃肉 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:46

    redirect 301 blog/index.php/weblog/rss_2.0/ http://www.domain.com/feed/
    

    It's that easy! Just make sure that the .htaccess file is located at the web root, which is usually `http://www.domain.com'.

    EDIT: For redirecting other pages, just follow the basic format

    redirect 301 [path from web root] [full path to the new page]
    

    You can add another line for every page that you want to redirect.

提交回复
热议问题