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: Serve same page regardless of request |
|
Author |
|
Karnage2
Joined: 19 Sep 2010 Posts: 2 Location: Australia
|
Posted: Sun 19 Sep '10 9:31 Post subject: Serve same page regardless of request |
|
|
I like to serve one single index page no matter what page is requested.
So it doesn't matter what someone type in after my domain name I want to return the same page.
Anyone know how to do this? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Sun 19 Sep '10 12:43 Post subject: |
|
|
it can be done with mod_rewrite
Code: |
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/dispatch.php(.*)$
RewriteRule ^(.*)$ /dispatch.php?$1
|
Make sure you enable mod_rewrite. |
|
Back to top |
|
Karnage2
Joined: 19 Sep 2010 Posts: 2 Location: Australia
|
Posted: Sun 19 Sep '10 23:30 Post subject: |
|
|
Hi James Blond
Thanks for the reply.
It works great. I my case I just replaced dispatch.php with index.html and it does exactly what I want. |
|
Back to top |
|
|
|
|
|
|