tags:

views:

21

answers:

2

I have two files in a folder called MyFolder: index.php and members.php I specify the member in members.php like so members.php?member=member1 I would rather just write something like this in the browser MyFolder/member1 index.php should be unaffected

What do I write in my .htaccess file to make this happen?

A: 

You could try something like:

RewriteEngine on
RewriteRule ^/myfolder/(.*) /myfolder/member.php?member=$1 [L]
RewriteRule ^/myfolder/?$ /myfolder/index.php [L]
Jonathan
Do I put that in myfolder?
Brian
no if that is the case then u would use something like this in whatever folder is located before myfolder:RewriteEngine onRewriteRule ^(.*) /member.php?member=$1 [L]RewriteRule ^/?$ /index.php [L]
Jonathan
That doesn't seem to work. It only changes the URL for anything I typ e to member.php
Brian
A: 

Try this:

RewriteEngine on 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) /member.php?member=$1 [L]
RewriteRule ^/?$ /index.php [L]

You can put that in the "myfolder" folder.

Jonathan
Did this work for you?
Jonathan