In my systems I am implementing this from the friendly URl since it seems unprofessional to see the extensions of the files and the variables that are passing through $ _GET, I have already managed to remove the extensions of the files by means of the .htaccess well, once the user enters his desk previously logged in I have this address:
http://localhost/test/casillero/usuario
here my htaccess file
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteBase /test/casillero/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
#Reglas para cambiar las extensiones de los archivos en las URL en los archivos principales
RewriteRule ^(.*)$ $1.php
RewriteRule ^registro$ frmregistro.php [NC]
RewriteRule ^login$ frmlogin.php [NC]
RewriteRule ^usuario$ escritorio_user.php [NC]
#Reglas para las URL amigables
RewriteRule ^([a-zA-Z0-9/_]+)$ escritorio_user.php?modo=$1 [L]
RewriteRule ^(.+)/(.+)$ escritorio_user.php?modo=$1&cas=$2 [L]
</IfModule>
here the menu bar where the user navigates
<ul class="nav navbar-nav">
<li ><a href="nvafactura/<?php echo $_SESSION['casillero'];?>"><span class="glyphicon glyphicon-list-alt" aria-hidden="true"></span> Facturas <span class="badge" id="facturaspendientes"></span></a></li>
<li ><a href="alerta#frmalerta"><span class="glyphicon glyphicon-bullhorn" aria-hidden="true"></span> Alertar</a></li>
<li ><a href="rastreo"><span class="glyphicon glyphicon-globe" aria-hidden="true"></span> Rastreo de paquetes</a></li>
</ul>
What is my problem? When the user browses, for example clicks the link 'alert' gets this address in the url:
http://localhost/test/casillero/alerta#frmalerta
Perfect! and so on when you click on the tracking link you get this address:
http://localhost/test/casillero/rastreo
Perfect! when you click on the link nvafactura you get this address:
http://localhost/test/casillero/nvafactura/DT24VZ-51
Perfect! because it is the format that I gave it in the file htaccess
and it is bringing me the results of the database since through that link I am passing 2 variables $_GET
.
Perfect! The detail is that when the system is in the last URL mentioned and the user wants to click for example on the link alert, it gets this address:
http://localhost/test/casillero/nvafactura/alerta#frmalerta
And if I give it back to crawling it gives me the following URL:
http://localhost/test/casillero/nvafactura/rastreo
Instead of giving me:
http://localhost/test/casillero/rastreo ó
http://localhost/test/casillero/alerta#frmalerta
And if I return to the link invoice gives me the following URL:
http://localhost/test/casillero/nvafactura/nvafactura/DT24VZ-51
I see that the system does not return to the base address once the user enters the link nvafacturas
and causes me a problem in the system does not show me the pages mentioned in the links, how can I resolve this since I have tried and I have not gotten, I read here a post that had a similar problem but I could not solve my problem, greetings.