Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
permanently redirecting using rewrite htaccess
Old 04-09-2005, 12:04 PM permanently redirecting using rewrite htaccess
sallam's Avatar
Average Talker

Posts: 23
Trades: 0
Hi

When I test use an .htaccess file that looked like this:
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^sub.domain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.sub.domain.com$
RewriteRule ^(.*)$ http://domain.com/folder [R=301,L]
it works fine, permanently redirecting the subdomain and all URLs that starts with it, to thir equivalent URLs in the new folder.
But when I use the otherwise, trying to redirect domain.com/folder to sub.domain.com, it does nothing, as if it's not there!
Here is what I use now:
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com/folder$ [OR]
RewriteCond %{HTTP_HOST} ^www.domain.com/folder$
RewriteRule ^(.*)$ http://sub.domain.com [R=301,L]
whats wrong here? why its not working the other way round?
I need it to redirect all old URLs to thier new ones.
I appreciate any help. Many thanks
sallam is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to permanently redirecting using rewrite htaccess
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.69624 seconds with 12 queries