LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > How to redirect a folder to a subdomain?

Reply
 
Thread Tools Display Modes
  #1  
Old 05-20-2009, 08:36 PM
freemangl freemangl is offline
New Member
 
Join Date: May 2009
Posts: 2
Default How to redirect a folder to a subdomain?

Eg:
I want to redirect
www.mydomain.com/wiki/***
to:
wiki.mydomain.com/***

how can I achieve that use .htaccess rewrite rule?

ps: 303 Redirect Type doesn't work in litespeed
Code:
Redirect 303 /wiki  http://wiki.mydomain.com

Last edited by freemangl; 05-20-2009 at 08:39 PM..
Reply With Quote
  #2  
Old 05-20-2009, 09:42 PM
auser auser is offline
Senior Member
 
Join Date: Mar 2009
Posts: 119
try rewrite:
in wiki/.htaccess:

RewriteEngine On
RewriteRule (.*) http://wiki.mydomain.com [R=303]
Reply With Quote
  #3  
Old 05-20-2009, 09:49 PM
freemangl freemangl is offline
New Member
 
Join Date: May 2009
Posts: 2
ah, thanks!

this works:
Code:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/wiki
RewriteRule (.*) http://wiki.mydomain.com [R=303]
Reply With Quote
  #4  
Old 05-20-2009, 10:37 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,585
It is better to create a wiki directory and put Rewrite rule or redirect directive in .htaccess under that directory.
The performance is better as the web server do not need to test it against every request, only when a request hitting wiki directory.
Reply With Quote
Reply

Thread Tools
Display Modes

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

Forum Jump


All times are GMT -7. The time now is 07:25 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.