BayX
I'm the Root. Fear me!
- Dec 18, 2015
- 75
- 27
- 96
Hey guys,
A little late but Happy New Year!
I'm working on a project that contains different function files and variables, which I want to make user/eye friendly. I'm not a very good friend with .htaccess so we have been fighting pretty much..
There's more files but I will use 2 files for this example..
So in user.php I have the following links:
I have tried to search a lot for a solution, but whatever I try fails. Either it only works with 1 variable, or it only works with 2. I can't get all links to rewrite and use the amount of variables I want..
So now I would like your help folks.
I really tried to make it very clear what I'm looking to do, but just tell me if anything is confusing..
A little late but Happy New Year!
I'm working on a project that contains different function files and variables, which I want to make user/eye friendly. I'm not a very good friend with .htaccess so we have been fighting pretty much..
There's more files but I will use 2 files for this example..
So in user.php I have the following links:
- user.php (List users)
- user.php?do=view&id=1 (View user with id 1)
- user.php?do=view&id=1&action=test (A new function for actions)
- admin.php (View dashboard)
- admin.php?do=users (List users)
- admin.php?do=users&action=view&id=1 (View user with id 1)
- admin.php?do=users&action=edit&id=1 (Edit user with id 1)
- admin.php?do=settings (Settings for the website)
Code:
site.com/user.php -> site.com/user
site.com/user.php?do=view&id=1 -> site.com/user/view/1
site.com/user.php?do=view&id=1&action=test -> site.com/user/view/1/test
I have tried to search a lot for a solution, but whatever I try fails. Either it only works with 1 variable, or it only works with 2. I can't get all links to rewrite and use the amount of variables I want..
So now I would like your help folks.
I really tried to make it very clear what I'm looking to do, but just tell me if anything is confusing..
Last edited: