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 -> Apache View previous topic :: View next topic
Reply to topic   Topic: Serve same page regardless of request
Author
Karnage2



Joined: 19 Sep 2010
Posts: 2
Location: Australia

PostPosted: Sun 19 Sep '10 9:31    Post subject: Serve same page regardless of request Reply with quote

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: 7355
Location: Germany, Next to Hamburg

PostPosted: Sun 19 Sep '10 12:43    Post subject: Reply with quote

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

PostPosted: Sun 19 Sep '10 23:30    Post subject: Reply with quote

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


Reply to topic   Topic: Serve same page regardless of request View previous topic :: View next topic
Post new topic   Forum Index -> Apache