Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Nov 2002
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    blocking outbound links?

    Hi
    Is there a way to block, at file, directory, or even server level, calls to external URLs (i.e. external to the domain)?

    I have a private directory where we store some pages grabbed on the Web; I'd like to prevent external elements (graphics, ad banners, etc.) to load automatically when the archived page is displayed -- without having to manually edit each file.

    Thanks for any idea.

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    41 8' 52" N -95 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Perhaps replace "http://" with nothing when you display the archived pages, unless the URL string contains your domain?
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #3
    New to the CF scene
    Join Date
    Nov 2002
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Err... sounds good but...
    How can I automate that?
    The idea is *not* to have to manually edit files.

    Pages will mostly be displayed using php's "include()", so I reckon there may be a way to trim the http:// part. But as some pages have something in their source html (I haven't really enquired that yet) preventing them to display properly (or to display at all) via php, I'd like to keep the option of directly displaying a page.

    So the question remains how exactly can I automatically "sterilize" outbound links at server level?

    Thanks.
    Last edited by ndruk; 11-15-2002 at 07:44 AM.

  • #4
    New to the CF scene
    Join Date
    Nov 2002
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ...?

    Could someone please tell me at least in which direction to enquire...
    thx

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    41 8' 52" N -95 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm not quite sure how you could do it in php (although I wouldn't give up hope - there may be a way!).

    Keep in mind I use ASP every day, not PHP.

    If you do end up manually editing files, you can open a hundred of them at once with Textpad and just do a global search and replace of

    http://

    with nothing... I know, not the best solution but it should work in a pinch. Maybe someone else will come along with a better suggestion.

    Like some way of denying any external access from the archived folders, I would imagine (except to your script). That should be possible I would think.
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •