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.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
Redirect entire domain - expect for one folder
Old 01-03-2007, 12:59 PM Redirect entire domain - expect for one folder
Junior Talker

Posts: 6
Trades: 0
Is it possible to redirect an entire domain, expect for the content in ONE FOLDER? If so, how can I do this?
keurkoop is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-06-2007, 08:22 AM
Average Talker

Posts: 18
Trades: 0
You could setup a mod_rewrite within .htaccess of all the folders that you want to redirect. I've been thinking about doing something similar on one of my sites in the near future and that's the first way I plan to try. You could probably also put the mod_rewrite settings within httpd.conf in order to avoid the htaccess overhead. (This would be for a Linux server, btw.)
__________________
...john2k...
imported_john2k is offline
Reply With Quote
View Public Profile
 
Old 01-07-2007, 02:25 AM
Ultra Talker

Posts: 407
Trades: 1
The following .htaccess file would redirect everything to the new domain except for files and folders that exist on this domain. I haven't tried it but it should work:
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [L]
</IfModule>
__________________
[
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
]
Lucas3677 is offline
Reply With Quote
View Public Profile Visit Lucas3677's homepage!
 
Old 01-11-2007, 10:27 AM
Nick204k's Avatar
Novice Talker

Posts: 8
Trades: 0
Quote:
Originally Posted by Lucas View Post
The following .htaccess file would redirect everything to the new domain except for files and folders that exist on this domain. I haven't tried it but it should work:
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [L]
</IfModule>

nice job lucas
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Nick204k is offline
Reply With Quote
View Public Profile
 
Old 01-11-2007, 02:07 PM
Junior Talker

Posts: 18
Trades: 0
That is good - i would never thought of using .htaccess :glare:
James` is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Redirect entire domain - expect for one folder
 

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.21034 seconds with 12 queries