Dynamic Redirects, R9, Mobile Directory

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
ChipWV
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 88
Joined: Tue Feb 03, 2009 12:51 pm

Dynamic Redirects, R9, Mobile Directory

Post by ChipWV » Tue Nov 11, 2014 8:16 am

After moving from AC7.07 to AC Gold R9, I need to redirect links to technical PDF's for the mobile site. We have a URL like:

mobile/Assets/PdfS/Hettich/Intermat-Instructions.pdf
which needs to go to:
Assets/PdfS/Hettich/Intermat-Instructions.pdf

In the above example "Hettich" is the manufacturer and each manufacturer has its own folder for management reasons

What should I enter into the dynamic redirect page?

My best guess would be: mobile/Assets/PdfS/ ---> Assets/PdfS/

A few more examples in the AC help page may be beneficial for some of us.

Thanks in advance for your help.
Chip
Last edited by ChipWV on Tue Nov 11, 2014 4:38 pm, edited 1 time in total.

ChipWV
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 88
Joined: Tue Feb 03, 2009 12:51 pm

Re: Dynamic Redirects

Post by ChipWV » Tue Nov 11, 2014 4:33 pm

Well, at least I'm not an idiot. When I run the redirect test I get this:
Enter a URL below to see how it is impacted by redirection and rewrites and to find the actual target script.
Request Url: *
YOU ARE LOOKING FOR 'MOBILE/ASSETS/PDFS/HETTICH/INTERMAT-MOUNTING-PLATE-SPECS.PDF':
/mobile/Assets/PdfS/Hettich/Intermat-Mounting-Plate-Specs.pdf
is redirected to
/assets/PDFs/Hettich/Intermat-Mounting-Plate-Specs.pdf
So as I read this, the rule is written correctly. Anybody have any ideas why this is happening?

Thanks
Chip

User avatar
Naveed
Rear Admiral (RADM)
Rear Admiral (RADM)
Posts: 611
Joined: Thu Apr 03, 2008 4:48 am

Re: Dynamic Redirects, R9, Mobile Directory

Post by Naveed » Wed Nov 12, 2014 2:01 am

It sounds like a bug and I am going to log this issue to investigate in details.

nadeem
Captain (CAPT)
Captain (CAPT)
Posts: 258
Joined: Tue Jul 31, 2012 7:23 pm

Re: Dynamic Redirects, R9, Mobile Directory

Post by nadeem » Wed Nov 12, 2014 2:40 am

Hello Chip,

Is this something legacy to use /mobile, why not you are using /Assets/PdfS/Hettich/Intermat-Mounting-Plate-Specs.pdf ? In Gold, we have mobile detection logic that is responsible for redirecting to mobile device if the incoming request is from a mobile browser. This logic might be conflicting with your directory structure for dynamic redirects.

ChipWV
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 88
Joined: Tue Feb 03, 2009 12:51 pm

Re: Dynamic Redirects, R9, Mobile Directory

Post by ChipWV » Wed Nov 12, 2014 8:34 am

Hi Nadeem,

Yes, the site does detect and display mobile pages properly. However, the relative links to my technical PDFs on the mobile pages are 404'ed. They are showing a URL of Domain.com/mobile/assets/ when the links should be redirected to Domain.com/assets/ My efforts to use the dynamic redirection built into Gold R9 do not work, even though the testing tool shows the URL redirect should be working.

I did nothing to "fix" the mobile redirect until I realized it didn't work. Google Webmaster Tools showed the 404 problem, thats when I started efforts to get it fixed.

There are other solutions to the problem. Change the links to be absolute vs. relative, or duplicate the content under the mobile directory. Both these solutions have problems in the longer term. Having absolute links could cause portability issues in moving or maintaining the content. Maintaining the content in two place assures at some point it will be out of sync due to human error. Having duplicate content could cause a Google SEO ranking penalty.

Thanks for your efforts, please let me know if you can at least come up with a temporary fix.

Chip

nadeem
Captain (CAPT)
Captain (CAPT)
Posts: 258
Joined: Tue Jul 31, 2012 7:23 pm

Re: Dynamic Redirects, R9, Mobile Directory

Post by nadeem » Thu Nov 13, 2014 12:39 am

How do you render your URL? Suppose you are doing this in product description, you can do it in a way so that IIS always render the URL from the root.

As a workaround you can add / at the start of the URL like this:

Code: Select all

<a href="/Assets/PdfS/Hettich/Intermat-Mounting-Plate-Specs.pdf">Download</a>
This should take you to the Domain.com/assets/ without using dynamic redirects.

ChipWV
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 88
Joined: Tue Feb 03, 2009 12:51 pm

Re: Dynamic Redirects, R9, Mobile Directory

Post by ChipWV » Thu Nov 13, 2014 8:28 am

Thanks Nadeem,

This will work. Now I'm off to do a search and replace. I don't know why I didn't see this obvious solution. That's what is great about support forums, a different set of eyes results in either a better or simpler solution.

Post Reply