• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

redirect issues

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have created a redirect component

when the system finds a missing page, it will throw a 301 ( Moved Permanently ) and redirect to a page

I am implementing the redirect as shown below






but when i use the above code,

if you specify



and when you give




why is it so , am i missing something ? is there any better way to throw 301 and redirect ?

master's .. please help me
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you checked the HTTP headers in the response?

I am wondering if the first is being detected by the container as a directory request and is being automatically redirected to the welcome file, rather than running through your '301' code.

The correct behaviour when a resource is not available is to return 404. Doing otherwise may have unforeseen consequences.
 
reply
    Bookmark Topic Watch Topic
  • New Topic