logo
Apache Lounge
Webmasters

 


About

Forum Index Downloads Search Register Log in  RSS Apache Lounge
 



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

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.



Redirect all requests?

 
Post new topic   Reply to topic    Apache Forum Index -> Coding & Scripting Corner



View previous topic :: View next topic  
Author Message
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: 610
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


Post new topic   Reply to topic    Apache Forum Index -> Coding & Scripting Corner
Page 1 of 1