I am coding a portal which has multi categories.
Example:
http://localhost/portal/cats
http://localhost/portal/dogs
Ofcourse this is possible with URL rewrite
Like this
RewriteRule ^cats$ /portal/index.php?cat=cats
Ok so this works alright.
Problem happens when I try to access page like this
http://localhost/portal/cats/black-cat-22
My url rewrite is:
RewriteRule ^cats/(.*)-([0-9]+)$ /portal/page.php?cat=cats&id=$2
Why?
Because all my CSS & image files are located in http://localhost/portal/elements and not in http://localhost/portal/cats/elements - which is not even real directory.
So I am looking for solution how to do rewrite if URL includes /elements/ it reads from /portal/elements not from any other directory.
If something is unclear, free to ask below.
Cheers and happy new year.