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

Posts: 6
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
 
When You Register, These Ads Go Away!
Old 01-06-2007, 07:22 AM
Junior Talker

Posts: 17
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.)
imported_john2k is offline
Reply With Quote
View Public Profile
 
Old 01-07-2007, 01:25 AM
Ultra Talker

Posts: 408
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>
Lucas3677 is offline
Reply With Quote
View Public Profile Visit Lucas3677's homepage!
 
Old 01-11-2007, 09:27 AM
Nick204k's Avatar
Novice Talker

Posts: 8
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
__________________
GameThinker | The Media Critics
Nick204k is offline
Reply With Quote
View Public Profile
 
Old 01-11-2007, 01:07 PM
Junior Talker

Posts: 18
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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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