Forum Moderators: coopster

Message Too Old, No Replies

Cookies and htaccess problem

         

Gian04

8:41 am on Aug 13, 2007 (gmt 0)

10+ Year Member



I have entered a code on my htaccess file that redirect [index.php] to root and add the [www] if someone doesn't type it.

example if the user enter http://example.com/index.php
it will be redirected to http://www.example.com/

The problem now is my login page

Initial loading of the page, it will ask for username and password.

If the user did not input, let say his username and click on the submit button, it will display an error message.

The problem is because of the the code on my htaccess file, it does not display the error message because it always treat the page load as initial loading

How can I address that?

[edited by: eelixduppy at 2:33 pm (utc) on Aug. 14, 2007]
[edit reason] fixed spelling [/edit]

Gian04

10:08 am on Aug 13, 2007 (gmt 0)

10+ Year Member



Anyone? Please, Im getting a lot of headache with this.

The issue is if you have a redirect code on your htaccess file, the effect is, it will always assume that all page loads are initial loading even if the page load is due to clicking a submit button (in which you have to pass a value to the page).

Habtom

10:14 am on Aug 13, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I would assume it is to make some exceptions on httaccess but can't tell you specifics. This is not a very elegant solution, but you could do the following:

Upon the login failure, write a login error to a session and upon the re-loading display it. Upon successful login, clear the session value, so that it doesn't show it next time.

Habtom