Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 20th Feb 2015, 08:45 AM   #1
Blain Jones
 
pmrc's Avatar
 
Join Date: 2009
Location: Valparaiso, IN
Posts: 163
Thanks: 4
Thanked 12 Times in 12 Posts
Default
htaccess rewrite rule
Share on: 
fb share twitter share gplus share more share

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

pmrc is offline  
Unread 20th Feb 2015, 09:25 AM   #2
Warrior Member
 
legendarywebco's Avatar
 
Join Date: 2014
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Re: htaccess rewrite rule
Share on: 
fb share twitter share gplus share more share

You need to add a new rule for the "p" variable.
legendarywebco is offline  
Closed Thread


Bookmarks

Tags
htaccess, rewrite, rule


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 01:14 AM.