How to write rewrite rule in htaccess file.

Posted by roopesh on Stack Overflow See other posts from Stack Overflow or by roopesh
Published on 2010-05-14T09:10:12Z Indexed on 2010/05/14 9:14 UTC
Read the original article Hit count: 249

Filed under:

I have a problem with rewrite rule

my link is www.something/group/group_id/place/groupName for this rewriteBase /

RewriteRule ^group/(.)/(.)/(.*)$ /group.php?gid=$1 [QSA,NC,L]

somet times my url may come www.something/group/group_id/groupName.

In Both cases I have to rewrite to group.php and I need only groupid. How to write rewrite rule to work in both situation?

© Stack Overflow or respective owner

Related posts about apache