Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

301 track

New Here ,
Nov 29, 2010 Nov 29, 2010

Hi forum,

is there a way to check a 301 header code?

I need to publish a list of URL, but I'd like to check (for every url) if it's a "fix" url (code 200) or a redirect (301 or 302).

If it's a redirect I need to publish the destination url.

Thanks.

327
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 29, 2010 Nov 29, 2010

Solution found: we can use cfhttp with redirect param to false.

In the result struct we can check:

x.responseheader.status_code

If it is 301 or 302...

Thanks!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 29, 2010 Nov 29, 2010

Do you mean that you want to check this using client-side tools? You could use something like wget with logging enabled, then parse the responses from the log file. But you might not want to treat 302 responses the same way you treat 301 responses. A 302 response is a temporary redirect, which means that you might not go to the same URL in the future as a result of the redirect. They're commonly used when you submit a form - you go to the action page, which redirects you to a third page.

Dave Watts, CTO, Fig Leaf Software

http://www.figleaf.com/

http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on

GSA Schedule, and provides the highest caliber vendor-authorized

instruction at our training centers, online, or onsite.

Read this before you post:

http://forums.adobe.com/thread/607238

Dave Watts, Eidolon LLC
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 29, 2010 Nov 29, 2010
LATEST

No no I needed a server checker. But like I wrote up I resolved.

Thanks.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources