user5693490
user5693490

Reputation:

.htaccess rewrite two variables

This is my current rewrite line

RewriteRule ^cam/([^/]+) /index.php?cate=$1[L]

however after the cate=$1 I need to define another variable I need to define the $currentpage

so RewriteRule ^cam/([^/]+)/?/index.php?cate=$1&currentpage=?[L]

I have put two unstyled question marks where I'm not sure what would go there. Thankyou for any help and I hope I've made it clear what I'm struggling with.

Upvotes: 1

Views: 64

Answers (1)

Croises
Croises

Reputation: 18671

Use:

RewriteRule ^cam/([^/]+)/([^/]+)/?$ /index.php?cate=$1&currentpage=$2 [NC,L]
RewriteRule ^cam/([^/]+)/?$ /index.php?cate=$1 [NC,L]

Upvotes: 1

Related Questions