Jump to content

form


user4fun
 Share

Recommended Posts

this is the format for a link<a href="http://www.mydomain.com/contact.php">the resultswww.mydomain.com/contact.phpBUTsometimes it ends up beingwww.mydomain.com/contact.php/which on submit it gets screwed and becomeswww.mydomain.com/contact.php/feedback_send.phpinstead of www.mydomain.com/feeback_send.phphow can i fix that?or why does it automatically adds the "/" when the original link is clicked.

Link to comment
Share on other sites

this is the format for a link<a href="http://www.mydomain.com/contact.php">the resultswww.mydomain.com/contact.phpBUTsometimes it ends up beingwww.mydomain.com/contact.php/which on submit it gets screwed and becomeswww.mydomain.com/contact.php/feedback_send.phpinstead of www.mydomain.com/feeback_send.phphow can i fix that?or why does it automatically adds the "/" when the original link is clicked.
try putting "/feedback_send.php" in the form's target<form name="" method="" target="/feedback_send.php"> // of coure, keep your values for name and method properties
Link to comment
Share on other sites

The only reason it would add a slash onto the end of a URL is if the original URL could not be found. Some browsers will add a slash to the end and ask again if the second one exists. That's because it is technically not valid to refer to a directory without a slash. If you have a directory called contact and you link to it like this:<a href="http://www.domain.com/contact">Technically you are asking for a file called contact, not a directory. The browser will ask for the file called contact, the server will return a 404, and the browser will ask for the directory called contact like this:<a href="http://www.domain.com/contact/">With the slash on the end the server identifies it as a directory and looks like up the index document for that directory. So leaving off the slash on your links would cause your users to send 2 requests to the server instead of one, it makes it a little slower.But the browser won't just automatically add slashes onto URLs that exist, there is either a rewrite rule doing that or the links are being written incorrectly.

Link to comment
Share on other sites

I dont think it is that kind off fix, it only happens the first timei enter the index pagei go to indexi include the file main_hdr.php which hold the linkthe cotnact page is opened with a / at the endi click the same link again and the the page is refreshed and the / is gone???

Link to comment
Share on other sites

I dont think it is that kind off fix, it only happens the first timei enter the index pagei go to indexi include the file main_hdr.php which hold the linkthe cotnact page is opened with a / at the endi click the same link again and the the page is refreshed and the / is gone???

Link to comment
Share on other sites

well..... the error is in my include fileIf you click on contact on the top right, you will see that the new address will have a back slash, once you go to the page and try to click the same link again, the back slash will be gone. It is really freaky. It is even weired if you try to submit the contact page.http://www.i-s-a-f-e.com

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...