htaccess Elite

Hire htaccesselite professional

.htaccess tutorial


All times are UTC - 5 hours





Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Rewrite Querystring to SubDomain
PostPosted: May 8th, '08, 04:14 

Joined: Apr 29th, '08, 02:11
Posts: 4
Hello ,

I want to convert example.com/index.html?shop=5
to
shop5.example.com.

Here is the code which i have implemented

Code:
Options +FollowSymLinks
Order deny,allow
RewriteEngine on
RewriteCond %{QUERY_STRING} ^([a-zA-Z0-9]+)\=(.*)
RewriteRule (.*) http:\/\/%1%2\.example.com\/? [R=301,L]


It's working almost all the browsers except IE . can anyone please modify so it can work in IE as well.

Thanks.


Top
 Profile  
 
 Post subject: Re: Rewrite Querystring to SubDomain
PostPosted: May 9th, '08, 16:09 

Joined: Oct 30th, '06, 13:55
Posts: 89
tejit2004 wrote:
I want to convert example.com/index.html?shop=5
to
shop5.example.com


Try this..

Code:
Options +FollowSymLinks
Order deny,allow
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} ^(.+)=(.+)$
RewriteRule ^(.*)$ http://%1%2.example.com/? [R=301,L]


Let me know if it works for you


Top
 Profile  
 
 Post subject: Re: Rewrite Querystring to SubDomain
PostPosted: May 9th, '08, 23:16 

Joined: Apr 29th, '08, 02:11
Posts: 4
Hi Thanks for giving your time .

But it seems it's still not working for me in IE.

It's working in all other browsers.
Thanks...


Top
 Profile  
 
 Post subject: Re: Rewrite Querystring to SubDomain
PostPosted: May 10th, '08, 22:10 

Joined: Oct 30th, '06, 13:55
Posts: 89
Thats definately not because of the code above, it can only be from other stuff in your .htaccess file or you need to clear the browser cache in IE. If it still doesn't work you can post your full .htaccess or provide the link so we can see what is going on.


Top
 Profile  
 
 Post subject: Re: Rewrite Querystring to SubDomain
PostPosted: May 11th, '08, 23:27 

Joined: Apr 29th, '08, 02:11
Posts: 4
Ok,
I have removed all the cache , other offline content and temporary files also. it still not works.

Here is the URL

http://tejastrivedi.com/index.html?shop=5
Thanks for taking an interest to solve my problem.
Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB