开发者

Cherokee redirect

开发者 https://www.devze.com 2023-03-23 02:22 出处:网络
My开发者_运维知识库 server is running Cherokee and I\'m trying to get a redirect to work. I\'m running into troubles with infinite redirect loops because I am redirecting to the same folder.

My开发者_运维知识库 server is running Cherokee and I'm trying to get a redirect to work. I'm running into troubles with infinite redirect loops because I am redirecting to the same folder.

My URL is:

http://domain.tld/example-variable (http://domain.tld/product-1234)

This needs to be redirected to:

http://domain.tld/index.php?item=variable (http://domain.tld/index.php?item-1234)

The Regex I have tried is:

^/product-(.*) /index.php?item-$1

This redirect is working. However, http://domain.tld is now broken as well as files like images (http://domain.tld/image.jpg). Other redirects I'm using are working just fine, but they redirect a folder to another folder (i.e. /folderA to /folderB).


have you tried making the rule non-final and the ordering is correct? typically, those two will cause the sort of issue you're seeing.


@brent I've tried that indeed and all combinations I could think of where not solving the problem.

I ended up using a subdomain:

product.domain.tld/1234

0

精彩评论

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