How to accept underscore in modrewrite?

Discuss practical ways rearrange URLs using mod_rewrite.

How to accept underscore in modrewrite?

Postby yalamber » Sat Sep 06, 2008 3:16 am

Hello here is my previus rewrite rule:
Code: Select all
  RewriteRule ^do/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)$ /index.php?do=$1&type=$2 [QSA,L]

It's not showing the fllowing url:
do/users/update_profile

I want to know what i have to put in the regx pattern to accept the underscores.
yalamber
 
Posts: 15
Joined: Fri Sep 07, 2007 12:52 am
Location: biratnagar

Found out

Postby yalamber » Sat Sep 06, 2008 3:29 am

Code: Select all
RewriteRule ^do/([A-Za-z0-9_-]+)/([A-Za-z0-9_-]+)$ /index.php?do=$1&type=$2 [QSA,L]
yalamber
 
Posts: 15
Joined: Fri Sep 07, 2007 12:52 am
Location: biratnagar


Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 17 guests

cron