I need to have
mysite.com/comment.php?id=sasdfkjsfj
redirected to
mysite.com/sasdfkjsfj.
Right now, i'm using this code for doing that
RewriteEngine on
RewriteBase /
#redirect to remove comment.php
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /comment\.php\?id=([^\ &]+) [NC]
RewriteRule ^ %1? [L,R=301]
#process the SEF Url with comment.php
RewriteRule ^([-a-zA-Z]+)$ comment.php?id=$1 [L]
It changes the url address to
mysite.com/sasdfkjsfj.
but that results a 404 page error. I have a separate comment.php page which is doing the job for
mysite.com/comment.php?id=sasdfkjsfj
where i get the id by $_GET['id'] from the url but now, how to handle
mysite.com/sasdfkjsfj
after redirection.
And also what changes i have to make for this type of URL
mysite.com/sasdfkjsfj/Url_redirect_option.