how to clone an old .jsp url?

Discussion in 'Programming' started by lenglain, Feb 4, 2013.

to remove all ads.
  1. lenglain

    lenglain New Member

    Messages:
    21
    Hi, I work for a non-profit organization and they have me doing everything including all the website stuff.

    today we got an email informing us that some research papers cite a paper we publiches in 2002 but the link is now obsolete, the paper is now at a new address on the new website.

    Here is the link

    www.ournonprofitsite.org/pov/position_item.jsp?pov_id=35

    I was thinking to simply create a new "/pov/" folder and then create a "position_item.jsp?pov_id=35" file with a simple redirect script to the new page, but dreamweaver is telling me that I cannot put special characters like "?" "_" or "=" .

    Any ideas on what I could do to make that old link work for anybody clicking on it?

    Thank you.
     
  2. chrishirst

    chrishirst Well-Known Member Staff Member

    Messages:
    2,611
    HTML:
    <a href="http://www.ournonprofitsite.org/pov/position_item.jsp?pov_id=35">Click Here</a>
     
  3. chrishirst

    chrishirst Well-Known Member Staff Member

    Messages:
    2,611
    Or meta redirect

    HTML:
    <meta http-equiv="refresh" content="0;url=http://www.ournonprofitsite.org/pov/position_item.jsp?pov_id=35">
     
  4. lenglain

    lenglain New Member

    Messages:
    21
  5. chrishirst

    chrishirst Well-Known Member Staff Member

    Messages:
    2,611
  6. lenglain

    lenglain New Member

    Messages:
    21
    Ok thanks for your help, but the old page in question no longer exists, so there is no page to insert the redirect in, that's why I was confused by your answer. I would like to find a way to generate that old url again so that I can then insert a redirect to the new url (which I already knew how to do).

    But what I don't know how to do is generating that url again, I can't just make a file with the same url since I cannot put special characters in a file.
     
  7. chrishirst

    chrishirst Well-Known Member Staff Member

    Messages:
    2,611
    That's only because you are using Dreamweaver.

    Does the server no longer run JSP? (Apache TomCat)?
    Have you access to a .htaccess file to rewrite or alias that one URI?
    What server side scripting does the server run?
     
  8. lenglain

    lenglain New Member

    Messages:
    21
    Our organization's site is a wordpress installation running on Cpanel, the only thing I see in Cpanel is an Apache handler tool that lets me add handlers for apache to treat as various extensions. For now the only two handlers configured are cgi-script (to be handled as .cgi .pl .plx .ppl .perl) and server-parsed (.shtml.) That's all I've been able to gather.

    Meanwhile I did try to create an html file from the cpanel back-end with the jsp address, but it changes the "?" and "=" to "%" so that the url is different than what I'm trying to recreate.

    I don't see anything mentioning javascript in the Cpanel back-end, is it possible that it just doesn't come configured to serve .jsp pages?

    Thanks for your help...my boss is pretty demanding he seems to think this is something that should have been easily been fixed within 5 minutes.
     
  9. chrishirst

    chrishirst Well-Known Member Staff Member

    Messages:
    2,611
    .jsp is nothing at all to do with javascript. JSP is an acronym for Java Server Pages.


    Create a folder /pov/ with a file called position_item.jsp and a file called .htaccess in it. Take careful note that .htaccess STARTS with a dot character

    Add this line to that .htaccess
    Code:
    AddType text/html .jsp
    and in "position_item.jsp" put
    HTML:
    <html>
    <head>
    <meta http-equiv="refresh" content="0;url=/OurReport/">
    </head>
    <body></body>
    </html>
    
    Is probably easier than working out a .htaccess redirect
     
    Last edited: Feb 5, 2013
  10. chrishirst

    chrishirst Well-Known Member Staff Member

    Messages:
    2,611
    Oh and use Notepad NOT Dreamweaver.
     

Share This Page