logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Coding & Scripting Corner View previous topic :: View next topic
Reply to topic   Topic: Redirect all requests?
Author
KuraKai



Joined: 09 Nov 2007
Posts: 12

PostPosted: Sun 11 Nov '07 4:56    Post subject: Redirect all requests? Reply with quote

How do you set it up for a server that if a request takes place that it redirects it to a different file. For like lets say your moving your site and all you have to leave is two files behind. One that says pretty much "All goes to index.html" and then index.html that says "We moved, link to new place." And for this to take place where ever they request it so even if it is a subfolder that it still points to that file.
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Sun 11 Nov '07 7:17    Post subject: Reply with quote

Use a directive like this in your httpd.conf file (or in your .htaccess file):
Code:
RedirectMatch 301 ".*" http:///www.yoursite.com/index.html

See the RedirectMatch documentation.

-tom-
Back to top
KuraKai



Joined: 09 Nov 2007
Posts: 12

PostPosted: Mon 12 Nov '07 0:11    Post subject: Reply with quote

Does that apply for all of them? Also how do you get it to redirect all the ones that don't exist. So if they try to view a html that doesn't exist it riderects them or even with .php. Second how do you get it to only apply for one directoy?
Back to top


Reply to topic   Topic: Redirect all requests? View previous topic :: View next topic
Post new topic   Forum Index -> Coding & Scripting Corner