Good day everyone,
I'm building my new website and i'm using the next folder structure:
www is the main directory with my index.php. Every page i open includes a php file from any subdirectory from a folder shown above (the folder structure is a small example of my folder structure).
To open a page i use a url like the next examples:
www.website.com/?pages=pages/contact/view.php www.website.com/?pages=pages/admin/customers/add.php?user=1&p_id=1838&c=3 www.website.com/?pages=pages/products/list.php?cat=1&subcat=3&sort=price&direction=asc&limit=100
I do have a lot of different url structures but i would like to make a seo friendly url. Something like this:
https://www.website.com/contact/view
https://www.website.com/admin/customers/add/1/1838/3
https://www.website.com/products/list/1/3/price/asc/100
I have tried to use the mod rewrite generator (http://www.generateit.net/mod-rewrite/index.php) but my pages won't load (i receive 404 error pages).
I do have 1 mod rewrite working but that one is hard coded.
RewriteEngine On
RewriteRule ^([0-9]+)$ /index.php?pages=pages/products/view.php&id=$1 [L]
this one makes from website.com/3525 > website.com/index.php?pages=pages/products/view.php&id=3525
Thanks in advance!
Can anyone help me?
Thanks in advance!