Help in htaccess

Discussion in 'Installation/Configuration' started by Rockuuu, Jul 13, 2011.

  1. Rockuuu

    Rockuuu New Member

    Hey Guys:
    i need help please in htaccess
    i have a very simple HTML design with simple PHP conatct us form , when i fill the form and hit the Submit button i get the Error 403 access forbidden
    i googled this i make more than 20 script for htaccess file BUT not a single one make it work

    i have no idea about it , would u please help me out here i would really apprciated it

    i will post the HTML and PHP script :
    $errors = '';
    $myemail = '*****@****.com';
    if(empty($_POST['name'])  || 
       empty($_POST['email']) || 
        $errors .= "\n Error: all fields are required";
    $name = $_POST['name']; 
    $email_address = $_POST['email']; 
    $message = $_POST['message']; 
    if (!preg_match(
        $errors .= "\n Error: Invalid email address";
    if( empty($errors))
    	$to = $myemail; 
    	$email_subject = "Contact form submission: $name";
    	$email_body = "You have received a new message. ".
    	" Here are the details:\n Name: $name \n Email: $email_address \n Message \n $message"; 
    	$headers = "From: $myemail\n"; 
    	$headers .= "Reply-To: $email_address";
    	//redirect to the 'thank you' page
    	header('Location: contact-form-thank-you.html');
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" ""> 
    	<title>Contact form handler</title>
    <!-- This page is displayed only if there is some error -->
    echo nl2br($errors);
    the html form

    <form method="POST" name="contactform" action="contact-form-handler.php"> 
    <label for='name'>Your Name:</label> <br>
    <input type="text" name="name">
    <label for='email'>Email Address:</label> <br>
    <input type="text" name="email"> <br>
    <label for='message'>Message:</label> <br>
    <textarea name="message"></textarea>
    <input type="submit" value="Submit"><br>
    maybe in the backage i bought with the hosting i didnt select this kind of services , its from 1AND1 by the way, i really dont know

    Best regards
  2. falko

    falko Super Moderator ISPConfig Developer

    Can you call the contact-form-handler.php script directly in your browser, or do you get a 403 as well?
  3. Rockuuu

    Rockuuu New Member

    Dear Falko:
    i get 403 error as well
    now i get this message even when i try to browse any page

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

    am using this code in htaccess

    <Directory />
    Allowoverride All
    <Location />
    Options +IncludesNoExec -ExecCGI
    i really cant do anything your help is really appreciated
    thanks sooo much
  4. Rockuuu

    Rockuuu New Member

    Guys any suggestion may help and is welcome,any suggestion may shed a light on things i cant figure out

  5. falko

    falko Super Moderator ISPConfig Developer

  6. Rockuuu

    Rockuuu New Member

    no i didn't check Apache's error log?
    how can i ?and maybe i post here to help me out Falko in it

    i appreciate it so much
  7. falko

    falko Super Moderator ISPConfig Developer

    Depending on your distribution, Apache's error log will be in /var/log/apache(2)/ or /var/log/httpd/.
  8. scorpious

    scorpious Member


    I was looking for a contact form with CAPTCHA this week, I searched the net and found this site.

    I selected Create a PHP Feedback Form (Requires PHP 4.2 or above)

    I followed the instructions, also this will require you to login to Google to get your ReCAPTCHA Public Key and your ReCAPTCHA Private Key if you want to use CAPTCHA.

    You do not need to alter your .htaccess or add to your htaccess to use this form. mine works fine on a demo site I have.

  9. Rockuuu

    Rockuuu New Member

    i guess i ruin the website:)
    now i get this message
    Error 404 - Not found

    Le fichier requis n'a pas été trouvé. Il peut s'agir d'une erreur technique. Veuillez réessayer ultérieurement. Si vous ne pouvez pas accéder au fichier après plusieurs tentatives, cela signifie qu'il a été supprimé.

    whenever i type ANY link even the main website.

    i get this htaccess in logs directory
    Options +Indexes
    Satisfy any
    Order Deny,Allow
    Allow from
    Allow from
    Allow from
    Allow from
    Deny from all
    RemoveType .html .gif
    AuthType Basic
    AuthName "Access to /logs"
    AuthUserFile /kunden/homepages/25/d346247991/htpasswd
    Require user u60784729
    i need help guys
  10. Rockuuu

    Rockuuu New Member

    What iam gonna do now
    is there anyway to restore defalt setting in website server? or anything similar
  11. falko

    falko Super Moderator ISPConfig Developer

    I don't know what you did exactly. But can't you simply revert all your changes and start from the beginning?

Share This Page