htaccess rewrite rule

by pmrc
1 replies
I am having trouble with an htaccess rewrite, what I need to happen is when a user goes here:

Code:
website.com/username?p=1
the rewrite should take them to:

Code:
website.com/index.php?user=username&p=1
This code works for transferring the username, but I cannot get the "p" variable to transfer:

Code:
RewriteRule ^(.*)$ http://website.com/$1 [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*/([a-zA-Z0-9_-]+)|([a-zA-Z0-9_-]+))$ ./index.php?user=$1 [L]
Any help would be greatly appreciated.

Thank you in advance
#htaccess #rewrite #rule
  • Profile picture of the author legendarywebco
    You need to add a new rule for the "p" variable.
    {{ DiscussionBoard.errors[9895373].message }}

Trending Topics