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.

2 Answers 2

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.

Sign up to request clarification or add additional context in comments.

Comments

1

try something like

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.