Mobile redirect how to bypass some folders

#1

Hello,

On my old website I want to use “mobile redirect” from www.mywebsite.com to m.mywebsite.com. Everything works very well but I have one problem, all my images are in www folder and my m. website go find all my image in www folder. So when I activate “mobile redirect” in cloudlfare everything works well but not images because all links image from www.mywebsite.com/images are rewritten to m.mywebsite.com/images is there a way to say if it’s for images don’t force m.

Thanks a lot

0 Likes

#2

Interestingly enough, page rules seem not to support mobile redirect settings. @cloonan?

@David2222, can you map such “m” requests manually to your images folder on your server?

0 Likes

#3

I tried two ways :
1 : htaccess : say that m.mywebsite.com/images redirect to www.mywebsite.com/images. It works well but cloudflare ignore it

2 : Force link with ROOT url but cloudflare ignore it also

0 Likes

#4

What is the reason these requests do not load the images in the first place?

0 Likes

#5

All my images are in www.mywebsite.com/images and when I turn on mobile redirect it redirect all images links to m.mywebsite.com/images . So I tried with Htaccess to say m.mywebsite.com/images go to www.mywebsite.com/images and even with that Cloudflare ignore it. And not sure if it was the best idea because there is lot of redirect with this method

0 Likes

#6

My question was why these requests do not load the images in the first place.

0 Likes

#7

I’m guessing this is is because Mobile Redirects are a global feature outside the scope of page rules. I know you cannot disable Mobile Redirect globally and bypass with a page rule to act on certain URLs. Speculating the inverse is also true but looking to for past tickets with a similar use case to verify.

0 Likes

split this topic #8

A post was split to a new topic: “__cf_mob_redir” cookie how set?

0 Likes

closed #9

This topic was automatically closed after 14 days. New replies are no longer allowed.

0 Likes