1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Source code blocked?

Discussion in 'HTML & JavaScript' started by Mutikasa, Oct 8, 2015.

  1. Mutikasa

    Mutikasa Power Member

    Joined:
    May 23, 2011
    Messages:
    579
    Likes Received:
    207
    There is one page I wanna rip, but I don't know how.
    Let me explain.
    When I go to the page via link like this
    HTML:
    http://domain.com/?ko=bla&la=koko
    I get to the page and it automatically redirects to root
    HTML:
    http://domain.com
    and now I can see the page and everything, but going to source code i see this
    PHP:
    <html>
    <
    head>
    <
    title>404 Not Found</title>
    </
    head>
    <
    body bgcolor="white">
    <
    center><h1>404 Not Found</h1></center><hr>
    <
    center>nginx</center></body></html>
    <!-- 
    a padding to disable MSIE and Chrome friendly error page -->
    <!-- 
    a padding to disable MSIE and Chrome friendly error page -->
    <!-- 
    a padding to disable MSIE and Chrome friendly error page -->
    <!-- 
    a padding to disable MSIE and Chrome friendly error page -->
    <!-- 
    a padding to disable MSIE and Chrome friendly error page -->
    <!-- 
    a padding to disable MSIE and Chrome friendly error page -->
    When i refresh it's 404 error page.
    How can you do this? It's first time I see this.
     
  2. AppCentral

    AppCentral Newbie

    Joined:
    Oct 7, 2015
    Messages:
    32
    Likes Received:
    8
    The source you're viewing is actually a 404 error page, and the padding that you're seeing is because MSIE (Microsoft Internet Explorer) and Chrome have a default 404 page if the 404 page supplied is under 512bytes.

    If you want to send me a link (PM) to the page, I can see if I can figure it out for you.
     
  3. blogzandstuff

    blogzandstuff Elite Member

    Joined:
    Jan 1, 2015
    Messages:
    6,422
    Likes Received:
    3,001
    Occupation:
    blog creator
    Location:
    UK
    well i just did it and looked at the source code ok, i wasn't redirected. i'm using chrome - placed cursor to side of page and view page source
     
  4. Asif WILSON Khan

    Asif WILSON Khan Executive VIP Jr. VIP

    Joined:
    Nov 10, 2012
    Messages:
    12,599
    Likes Received:
    34,738
    Gender:
    Male
    Occupation:
    Fun Lovin' Criminal
    Location:
    London
    Home Page:
    • Thanks Thanks x 1
  5. Asif WILSON Khan

    Asif WILSON Khan Executive VIP Jr. VIP

    Joined:
    Nov 10, 2012
    Messages:
    12,599
    Likes Received:
    34,738
    Gender:
    Male
    Occupation:
    Fun Lovin' Criminal
    Location:
    London
    Home Page:
    Yeah, I don't think that is the real domain that OP posted.
     
  6. towelfox

    towelfox Junior Member

    Joined:
    Jan 11, 2012
    Messages:
    175
    Likes Received:
    61
    View source isn't always very helpful. If be more inclined to inspect with firebug &/ the built in inspectors so you can see anything loaded asynchronously
     
  7. HelloInsomnia

    HelloInsomnia Jr. Executive VIP Jr. VIP

    Joined:
    Mar 1, 2009
    Messages:
    1,828
    Likes Received:
    2,939
    In Chrome just put this in front of the URL you want to see the source code for - view-source:
     
    • Thanks Thanks x 1
  8. Mutikasa

    Mutikasa Power Member

    Joined:
    May 23, 2011
    Messages:
    579
    Likes Received:
    207
    I discovered he is running on django. he is doing redirect but the visual page stays the same
     
  9. Mutikasa

    Mutikasa Power Member

    Joined:
    May 23, 2011
    Messages:
    579
    Likes Received:
    207
    mamma mia, this worked! sort of...
    now when I open saved html it actually shows html code, like literally.
     
  10. Mutikasa

    Mutikasa Power Member

    Joined:
    May 23, 2011
    Messages:
    579
    Likes Received:
    207
    Success, thank you all!
     
  11. Mutikasa

    Mutikasa Power Member

    Joined:
    May 23, 2011
    Messages:
    579
    Likes Received:
    207
  12. Asif WILSON Khan

    Asif WILSON Khan Executive VIP Jr. VIP

    Joined:
    Nov 10, 2012
    Messages:
    12,599
    Likes Received:
    34,738
    Gender:
    Male
    Occupation:
    Fun Lovin' Criminal
    Location:
    London
    Home Page:
    • Thanks Thanks x 2
  13. sockpuppet

    sockpuppet Junior Member

    Joined:
    Nov 7, 2011
    Messages:
    155
    Likes Received:
    145
    you do it with history.pushState javascript api
    he is doing this
    Code:
    history.pushState( {}, '', '/' )
    
    that is not redirecting to root, just changes the url in the address bar to root
    but when you refresh you call that url which is a 404 error page
     
    • Thanks Thanks x 1
  14. Mutikasa

    Mutikasa Power Member

    Joined:
    May 23, 2011
    Messages:
    579
    Likes Received:
    207
    oooooooo very clever!
    At first I thought it causes httrack to fail, but now ive tried second time and httrack succeeded