简体   繁体   中英

Firefox not finding form redirect page with 404 error.

I created a pretty simple contact form for a site using tectite.com's Formmail.php as the script to process the form. I've been using it for years with no issues.

Form works great in all browsers. Sends all the fields (including a photo upload) with no issues except that in Firefox the redirect "Thank You" page cannot be found by the server. The response I get from the server is:

Not Acceptable

An appropriate representation of the requested resource /thankyouforstory.php could not be found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Again, this is only happening in Firefox. Works great in IE (which is usually the reverse of the way it goes).

Code from the form itself here:

<form action="http://www.mysite/formmail.php" method="post" name="SethStory" enctype="multipart/form-data">
                        <input type="hidden" name="env_report" value="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT,AUTH_TYPE,REMOTE_USER" />
                        <input type="hidden" name="recipients" value="email_1,email_2" />
                        <input type="hidden" name="required" value="EmailAddr:Your email address,FullName:Your name" />
                        <input type="hidden" name="subject" value="Seth Story Submission" />
                        <input type="hidden" name="good_url" value="http://www.mysite_thankyoupage" />
                        <input type="hidden" name="derive_fields" value="email=EmailAddr,realname=FullName" />
                        <input type="hidden" name="mail_options" value="Exclude=email;realname,FromAddr=email_3" />

                        <p><strong>Please enter your Name and Email address:</strong></p>
                        <div class="formbox"><input name="FullName" type="text" size="60" maxlength="70" /></div><div class="formlabel">Name:</div>
                        <br class="clearfloat" /> 
                        <div class="formbox"><input name="EmailAddr" type="text" size="60" maxlength="70" /></div><div class="formlabel">Email:</div>
                        <br class="clearfloat" />
                        <p><label><strong>Your Seth Story:</strong></label></p>
                        <div class="formbox"><textarea cols="60" name="story" rows="10"></textarea></div>
                        <br class="clearfloat" />
                        <p><strong>Upload your photograph here:</strong></p>
                        <input type="file" name="first_file" />
                        <p><input type="submit" value="Submit Story" /></p>
                        <br class="clearfloat" />

                        </form>

If this is the exact code, it seems you have an error here:

<input type="hidden" name="good_url" value="http://www.mysite_thankyoupage" />
                                                             ^ here

Should probably be:

<input type="hidden" name="good_url" value="http://www.mysite.com/thankyoupage.php" />

or something similar.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM