4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 How do I redirect a user to a subdirectory with mod_rewrite?
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
Corvin666
Junior WebHelper
Junior WebHelper


Joined: 11 Mar 2005
Posts: 1

PostPosted: Fri Mar 11, 2005 9:23 pm (12 years, 8 months ago) Reply with QuoteBack to Top

Hello,

i have uploaded a new version of my site to a subdirectory on my FTP server, but I don't want to erase the old version yet. So I need to setup some redirection mechanism so that anyone typing www.mysite.com would get content fetched from www.mysite.com/new_site, but will still have www.mysite.com in his address bar (or whatever). I think that mod_rewrite is just the tool for this task. But i cannot understand how I should write the rule. I write the following:

RewriteEngine On

RewriteRule ^(.*)$ /site_new/$1

but this results in a deadlock (I use a testing server for that Smile )

Can anyone suggest a rule for my task?

Thanks a lot
OfflineView User's ProfileFind all posts by Corvin666Send Personal Message
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




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 vote in polls in this forum.


Page generation time: 0.069396 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme