Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
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.
| |
|
Topic: Redirect all requests? |
|
Author |
|
KuraKai
Joined: 09 Nov 2007 Posts: 12
|
Posted: Sun 11 Nov '07 4:56 Post subject: Redirect all requests? |
|
|
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
|
Posted: Sun 11 Nov '07 7:17 Post subject: |
|
|
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
|
Posted: Mon 12 Nov '07 0:11 Post subject: |
|
|
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 |
|
|
|
|
|
|