htaccess (mod_rewrite) VS 404 header trick?

Discussion in 'General Scripting Chat' started by ps3ubo, Nov 29, 2010.

  1. ps3ubo

    ps3ubo Registered Member

    Jan 25, 2010
    Likes Received:
    You can make fake urls with htaccess' mod_rewrite as well all know.
    But would it be more server friendly to use a 404 trick instead?
    such as /example/fake_name.html isn't real, however I can point it to 404.php and trick the headers making it 200 OK then include the files you want for the mod_rewrite.

    Surely this will be better for your bandwidth and page load (mod_rewrite takes extra bandwidth away)

    WHat are your thoughts on this matter? :biglaugh:

    P.S also there is a 3rd option I thought of; Using this
    that ? in the url makes it into a GET.
    Ofcause we can use PHP magic to extract the file name of the file or whatever to use it like mod_rewrite...
    Last edited: Nov 29, 2010