Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
Common Questions
 Helicon Tech : Common Questions
Subject Topic: mod_rewrite subdomain with subdir Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
pooyara
Newbie
Newbie


Joined: 27 September 2007
Online Status: Offline
Posts: 1
Posted: 27 September 2007 at 4:07am | IP Logged Quote pooyara

I am trying to achieve this
http://website.com/?action=xx2&user=xx1 to
http://
xx1.website.com/xx2

i can

http://website.com/?
user=xx1 to
http://xx1.website.com

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{QUERY_STRING} !user=[^&]
RewriteCond %{HTTP_HOST} ^(www\.)?([^.]+)\.website\.com
RewriteRule (.*) /$1?user=%2 [L]

Back to Top View pooyara's Profile Search for other posts by pooyara
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 4178
Posted: 27 September 2007 at 7:34am | IP Logged Quote Anton

RewriteEngine on
RewriteBase /
RewriteCond %{QUERY_STRING} !user=[^&] [NC]
RewriteCond %{HTTP_HOST} ^(www\.)?([^.]+)\.website\.com [NC]
RewriteRule (.*) /action=$1&user=%2 [NC,L]


__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum