I have a website developed in php and mysql now I want to use URL friendly to my links.
I have for example the traditional link:
midominio.com/portal/public/oficinas.php?seccion=24
24 is to the section: office
On this page it shows me the list of offices:
- Logistics
- Customer service
I try to show myself in friendly URL:
midominio.com/portal/public/oficinas
Now I also have this URL:
midominio.com/portal/public/oficinasDetalle.php?seccion=24&categoria=56
Where my section is: offices and category is
I try to make it my URL:
midominio.com/portal/public/oficinas/logistica
There are 2 links one that shows me the list of offices and the other one that shows me the detail of the office, as it would be in .htaccess
to make friendly links as well as I explain lines up.
For example, when the user types a link that does not exist, I get a 403 error.
Actually I already did this:
Option +FollowSymLinks
RewriteEngine on
RewriteRule ^.*$ ./index.php
Now in my index.php found in the portal root:
if ($parte_url=="oficinas") {
include_once(public/oficinas)
}else {
echo "error 404";
}
My link looks like this:
misitio.com/portal/oficinas
Even there everything perfect shows me the list of offices, as well as I wish, now I have this link where it shows me the detail of an office
midominio.com/portal/public/oficinasDetalle.php?seccion=24&categoria=56
And I would like it to be like this:
misitio.com/portal/oficinas/logistica
Please help .. I just need that to publish it on the web.
or if you have another idea of how to do it, if you can help me implement it