Gorki
Gorki

Reputation: 89

Rewriting Url With .htaccess for Muliple Parameters

I Want to rewrite the url using .htaccess Plz Read the code, and you well Get to know What I mean

My URL :

article.php?id=1&title=example

Using this in .htaccess

 RewriteRule ^article/([0-9]+)/([0-9a-zA-Z_-]+)$
 article.php?id=$1&title=$2 [NC,L]

I get

article/1/example

What i need is

article/example

Upvotes: 1

Views: 72

Answers (1)

michelem
michelem

Reputation: 14590

So something like this:

RewriteRule ^article/([0-9a-zA-Z_-]+)$ article.php?title=$1 [NC,L]

Upvotes: 1

Related Questions