If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 1 of 1

Thread: Apache problem

  1. #1
    Senior Member straight_up's Avatar
    Join Date
    Dec 2003
    Member #
    This isn't really a PHP problem - It's an Apache problem.

    I'm on 1&1.

    My system takes all requests (all pages) not containing a period (like a .gif etc) and redirects to /php/page.php.

    That works great, cuz then i use php to determine what the request was and dynamically generate the page.

    Now there is a sporadic 404.

    It seems my ReWriteRule can't find this file -
    then my 404 kicks in and then it goes to page.php.
    BUt the environment status has been set to 404, so i get a 404 error.

    This is really, really weird BECAUSE this exact system has been working for a while now and just decided to quit; no changes were made recently.

    Update: I got it to work again. Apparently the folks at 1&1 decided to use a new version or settings for mod_rewrite. That messed up some of then environment variables (specifically script_url) so my code no longer received the data it needed. My fix involved using request_uri and strtok().
    So really, my RewriteRule could find page.php, but then the environment variables threw off my PHP.
    I am Alan Hogan (@alanhogan on Twitter). I like PHP, UI/UX design, and OS X.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT -6. The time now is 08:22 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: