manalnor Posted August 13, 2011 Share Posted August 13, 2011 Hello friends, what to write in .htacess file so that i can convert the following link cat.php?id=$id to $id/something-anything so that by hitting the link $id/something-anything it will redirect to cat.php?id=$id automatic I've tired this but faild RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ cat.php?id=$1 [L,QSA] Thanks Quote Link to comment https://forums.phpfreaks.com/topic/244713-the-link-id/ Share on other sites More sharing options...
The Little Guy Posted August 13, 2011 Share Posted August 13, 2011 Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule (.+?)$ someFolder/cat.php?id=$1 Quote Link to comment https://forums.phpfreaks.com/topic/244713-the-link-id/#findComment-1256931 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.