I started experimenting with rewrite rules in .htaccess file. I am trying to change the url using RewriteRule but unable to accomplish it.
Need to get contents from
user.php?user=3&name=xyz when user.php/xyz is accessed
user=anydigit and name=anyname
The current code which i am using is
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^/user.php/([0-9]+)/([a-z]+)$ /user.php?user=$1&name=$2
</IfModule>
When i use the above code nothing is happening.
Because you are accessing wrong page. rules on .htaccess says you should access a url like
user.php/3/xyzinstead ofuser.php/xyz