Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to get the user-name and account_id(the number at the end in the example '1') out of this url

I have tried this rule but I can't get the account_id

rewrite ^/desinger/(.+)_([0-9]+)$ /index.php?m=USER&hdn_account_id=$2 last;
share|improve this question

migrated from Sep 23 '12 at 10:38

This question came from our site for professional and enthusiast programmers.

 rewrite ^/desinger/(.+)_([0-9]+)$ /index.php?m=USER&hdn_account_id=$2 last;

you're missing the .html in your regex, it should be

 rewrite ^/desinger/(.+)_([0-9]+).html$ /index.php?m=USER&hdn_account_id=$2 last;
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.