Natthapon Pinyo
Natthapon Pinyo

Reputation: 3

mod rewrite with 2 parameters

I just started to learn about mod rewrite process. Now, I got some problems about mod rewrite using 2 parameters like the following statements:

Normal URL format

domain.com/index.php?p=portfolio&c=web-application

Target URL format

domain.com/portfolio/web-application

Currently Rewrite Rule

RewriteRule ^([A-Za-z0-9-A-Za-z0-9]+)/([A-Za-z-0-9]+)/?$    ?p=$1&c=$2  [L]

Snapshot of problem
Snapshot http://www.iamnbty.com/mod-rewrite-problem.PNG

Target

www.iamnbty.com/mod-rewrite-target.PNG

Any suggestions?

Upvotes: 0

Views: 123

Answers (1)

undone
undone

Reputation: 7888

RewriteRule ^([\S-]+)/([\S-]+)/?$   ?p=$1&c=$2 [L]

Upvotes: 1

Related Questions