Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

http://abc.com/desinger/user-name_1.html

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 stackoverflow.com Sep 23 '12 at 10:38

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

1 Answer 1

 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

 
discard

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