Apache redirect

后端 未结 2 1397
萌比男神i
萌比男神i 2020-12-22 07:19

I would like to redirect a URL using RedirectMatch within Apache eg,

/test/one/?? redirect to /test/two/??

where the ?? represents any string that follows

2条回答
  •  春和景丽
    2020-12-22 07:50

    RewriteEngine ON
    RewriteBase /
    RewriteRule ^/test/one/(.+)$ /test/two/$1
    

    if that does not work, change ^/test/one into ^test/one

    make sure mod_rewrite is enabled

提交回复
热议问题