ThreadsDev FusionBB Greeting Cards FusionBBDev.com Measurection.com VertexHost NASCAR Racing MouseFunFacts.com Myrtle Beach Info UBB.Threads Modifications threadsdev.net
FusionBB

Trans-D Tropin
Use Coupon Code '1004' to Save $20 Off Your Initial Order of Trans-D Tropin®
General Discussion >> Linux Discussion

Pages: 1
Mudpuppy
Journeyman
*****

Reged: 08/16/02
Posts: 113
Loc: Sin City
using .htaccess to redirect an entire domain
      #128472 - 06/25/05 03:04 PM

I was going to direct this to Josh, but as he's out of town on one of his oh-so-frequent vacations , I hope it's okay to ask it here.

I'm currently modifying about 25 domains to comply with the new enforcement of the 2257 law (it's a law which applies to adult webmasters). Until I've finished modifying a domain, I'd like to redirect everything on that domain to another site which is already in compliance. I want to use a .htaccess file to do this, but the one I'm using currently isn't working correctly:

Redirect 302 / http://www.mytemporarysite.com/

I want the redirect to work on every page and subfolder and pages in subfolders on my old domain. I just want all 5000+ pages and subfolders on my old domain to ALL be redirected to the index page of www.mytemporarysite.com. As I've got it now, the .htaccess file is only redirecting the main index page of the domain, i.e. mycurrentsite.com/index.html. If I try to access any other page on that domain, I just get a 404 error.

So, is there a way to use .htaccess to force every single page on a domain to be redirected to a single page on another site, without listing every page or subfolder individually?


Post Extras: Print Post   Remind Me!   Notify Moderator  
Anno
Code Monkey
****

Reged: 05/23/01
Posts: 648
Loc: Austria
Re: using .htaccess to redirect an entire domain [Re: Mudpuppy]
      #128473 - 06/25/05 04:07 PM

Use this:

RewriteEngine on
RewriteRule (.*) http://www.mytemporarysite.com/

--------------------
The Rich Jerk
Google Cash

Subforums for UBBThreads
Fungifun


Post Extras: Print Post   Remind Me!   Notify Moderator  
Anno
Code Monkey
****

Reged: 05/23/01
Posts: 648
Loc: Austria
Re: using .htaccess to redirect an entire domain [Re: Anno]
      #128474 - 06/25/05 04:22 PM

A different approach would be to use your redirect:

Redirect 302 / http://www.mytemporarysite.com/

and on http://www.mytemporarysite.com/
you specify:

ErrorDocument 404 /

--------------------
The Rich Jerk
Google Cash

Subforums for UBBThreads
Fungifun


Post Extras: Print Post   Remind Me!   Notify Moderator  
Mudpuppy
Journeyman
*****

Reged: 08/16/02
Posts: 113
Loc: Sin City
Re: using .htaccess to redirect an entire domain [Re: Anno]
      #128476 - 06/26/05 02:39 AM

Quote:

Anno said:
Use this:

RewriteEngine on
RewriteRule (.*) http://www.mytemporarysite.com/




I used this one, and it worked perfectly. Thanks so much!


Post Extras: Print Post   Remind Me!   Notify Moderator  
Anno
Code Monkey
****

Reged: 05/23/01
Posts: 648
Loc: Austria
Re: using .htaccess to redirect an entire domain [Re: Mudpuppy]
      #128478 - 06/26/05 03:22 AM

You're welcome.

--------------------
The Rich Jerk
Google Cash

Subforums for UBBThreads
Fungifun


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 1 anonymous users are browsing this forum.

Moderator:   

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 1834

Rate this topic

Jump to
 
Hot Topic
No posts have caught fire as of yet.

Developers for Hire
Are you looking for custom modifications? Upgrades? Installs?
We have developers who can help!
View Our Services Page for information.

Login
Enter your username and password to login. If you do not have a username you can register one HERE.
username:
password:

Send Password
Remember Me

Online
119 guests have been online with in the last 90 minutes.

ThreadsDev.com
Trans-D Tropin

Current Threads
No current threads found...

Modifications
Recently Added:
· View Private Messages v0.9.3
· Stop Guests from seeing "Who's Online." [6.5.5]
· User List Display Limited by Post Count 1.0
· Paginate PMs 1.0
· Today and Yesterday

Most Downloaded:
· Inline Images 3.1
· Quote Username 1.0
· Games Arcade Deluxe v1.8
· UbbThreads and Photopost Total Integration Version 4
· Tool Tip Body Preview 3.0

Highest Rated:
· Mass Threads Move for 6.3
· Update Last Posts 1.0
· Update B_Parent User 1.0
· Integrated Index Page (IIP) 5.3.1
· IIP SideBarPal 1.1

Recent Stylesheets:
· Mix-Colors_2-0_3D for UBBT v6.3 - 6.5
· Mix-Colors_2-0 for UBBT v6.3 - 6.5
· Dark-Grey_3-0 for UBBT v6.3 - 6.5
· Green-Orange_1-0 for UBBT v6.3 - 6.5
· ebay_1-0 for UBBT v6.3 - 6.5

Recent Template Mods:
· Postlist modification - line separates new topics and replies
· I need some help with my postlist.tmpl file
· Edit, reply, and quote buttons mod for Facelift 6.5
· Google Add Sense add on for Threads 6.5
· Article templates for Thread 6.5

Shout Box

Short Stats
New Members:
4 Last 24 hours
20 Last 7 days
107 Last 31 days

Boards:
11676 Total topics
73324 Total replies

Totals:
5728 Members
85000 Posts

Max Online:
814 Total
(06/01/06 09:46 AM)


Web Hosting Provided by
VertexHost Web Hosting

Content ©2003-2006 ThreadsDev.NET
Powered By UBB.threads™ 6.5.5

 .: IIP 5.5 by David Lozier ©2003 :. 
Distributed by ThreadsDev.net

Visit Our Sister Sites!
JoshuaPettit.com and ThreadsAddons.com
Web Hosting Provided by
VertexHost Web Hosting

Generated in 0.555 seconds in which 0.351 seconds were spent on a total of 26 queries. Zlib compression enabled.


Whiplash Claims - Stacking Rings - Jewellery - Whiplash