views:

62

answers:

2

I have a login script using PHP. The variables for login in and out are

log.php?do=in and log.php?do=out

I would like to change this to log/in and log/out if possible.

Im really struggling to understand .htaccess and the rewriting at the moment ^^

+1  A: 

Try this:

RewriteEngine on
RewriteRule ^log/(in|out)$ log.php?do=$1 [L]
Gumbo
+1  A: 

The basic format of what you want is (example found at this site)

RewriteEngine on
RewriteRule ^old\.html$ new.html

The caret, ^, signifies the start of an URL, under the current directory. The dollar sign signifies the end of the string to be matched. The backslash is to escape the dot, which is a special character.

You might also want to look at some mod_rewrite tutorials, there are some well written ones if you look around enough.

jsims281