0

I have a project am working on but I got a problem.

Problem

Main GET data: www.enterr.com/profile.php?username=beraki

Will be : www.enterr.com/beraki This is ok

But I have a 2 GET data url : www.enterr.com/profile.php?username=beraki&mode=about I would like it to be : www.enterr.com/beraki/about

And if I have a 3 GET data url I want them all to be friendly as above.

tshepang
  • 12,111
  • 21
  • 91
  • 136
Beraki
  • 142
  • 1
  • 2
  • 15

2 Answers2

2

Try this for two get data:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/(.*)$ profile.php?dataone=$1&datatwo=$2

Try this for three get data:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/(.*)/(.*)$ profile.php?dataone=$1&datatwo=$2&datathree=$3

The above codes work, checked it. Just replace dataone, datatwo, datathree with the data you are passing.

Ankur Sinha
  • 6,473
  • 7
  • 42
  • 73
1

try something like

Options +FollowSymLinks
RewriteEngine On
RewriteRule ^(.*)/(.*)/(.*)$ profile.php?username=$1&mode=$2&third=$3
h0mayun
  • 3,466
  • 31
  • 40