1
Hello,
I’m developing an online compiler, similar to Ideone, and would like users to be able to access some of their codes already made on the site in a simpler way.
Currently I use a page codAnterior.php for this, I pass GET to her the code ID, so the url is, www.site.com/Compilador/codAnterior.php?id=1, I’d like you to stay www.site.com/Compilador/1.
For this I saw that I can use the . htaccess, I thought to use the following code, but I do not know if it is right.
RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^Compilador\/([a-z,0-9,A-Z,_-]+)\/?$ codAnterior.php?id=$1