This is the second time I'm asking here about it. I shall try to make it easier to give you the answer.
This is all about rewriteing rule. First of all, have a look below:
The following 4 php script is related to account managing of my php login script.
- account.php
- login.php
- signup.php
- logout.php
More details about the scripts:
Accout.php has 4-5 pages based on GET request. E.G. ?page=edit, ?page=view etc.
Login.php has only 2 pages, ?action=login and ?action=block.
Signup.php has 3 pages, ?page=process, ?page=process&step=1,2.
logout.php has only one page.
That's a part of my script. Now I'm interested to rewrite the ugly url. I want all the page has 'account' prefix.
- account/edit
- account/view
- account/login
- account/login/blocked
- account/create
- account/create/step/1
- account/create/step/2
- account/logout
I think I have cleared my question as much as I can. I have tried a lot but get failed. I hope you guys have the answer for me for "How could I do that?" or "What's the code should behind this situation?"
Please, I really need your help badly.
[Edit]
Thanks for your support @JonLin. Thanks a lot. But I need one more help from you. I hope if you help here i could do others.
Now i have,
- forum.php?fid=1&p=2
- thread.php?tid=1&p=2
(its not only 1 or 2, its [(0-9)+] )
How to do it like this
- forum/f1/anything/page-2
- forum/t1/anything/page-2
I've tried your signup.php code with a little edit, but its not working.
All of my pages of the script is formatted like this, any.php?xid=n&p=n ( n != 1 or n > 1 ).
So i want the same prefix used for any.php, that related to the any.php, for i.e. any.php has a book.php i want the url like this, any/a1/anything/page-2 and any/b1/anything/page-2 ( page-n will be shown when n > 1 )
Please help me here, I am stuck here. Thank you very much for your friendly help.