It's the first time I need mod_rewrite in one of my scripts and I don't know how this could be possible in my case, I've tried several tutorials and some worked but then I had a static page 3k.html instead of link.php?id=3k and it didn't work for any other id than 3k I need to have this link: ./link.php?id=$1 to become ./$1/ So ./link.php?id=3k would become ./3k/ Any idea what I should put in my .htaccess? Thank you . - Silence. Edit: this is what I tried: RewriteEngine on RewriteRule /(.*)/$ /link.php?id=$1
Options +FollowSymLinks RewriteEngine On RewriteRule ^/([a-zA-Z0-9-_]+)/$ ./link.php?id=$1 [R=301,NC] Code (markup): ** Had nowhere to test it so let us know if you still have problems with this ..
Also worked without those [] in the end . But now only site/id/ works and not site/id, a slash is required in the end, any idea how to make both work?
Options +FollowSymLinks RewriteEngine On RewriteRule ^/([a-zA-Z0-9-_]+)(/)?$ ./link.php?id=$1 [R=301,NC] Code (markup): And again .. haven't tested it but everything should work as expected.