Forum Moderators: phranque

Message Too Old, No Replies

starting with page in subdirectory without redirect

How can I make a page in a subdirectory to a starting page of a web

         

Markus05

9:25 pm on Nov 9, 2005 (gmt 0)

10+ Year Member



Hello,

How can I make a page in a subdirectory to the starting page of a virtual host without sending a HTTP redirect to the client.

E. g. D:/root is the root web and I want the user to start with D:/root/subdirectory/startpage.php.

I would like to avoid to send a redirect to the client. Is there a server side solution?

Markus

jdMorgan

9:48 pm on Nov 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Use mod rewrite to rewrite requests for "/" or the index page to a page in any Web-accessible subdirectory you like.

For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].

Jim

Markus05

9:51 pm on Nov 9, 2005 (gmt 0)

10+ Year Member



But is not mod rewrite also sending a redirect to the client?

Markus

jdMorgan

2:52 am on Nov 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



mod_rewrite can send an external redirect response, an error response, perform a proxy throughput, or simply substitute a different internal filepath for use in serving content for a specific URL.

The latter function is the one you want. See the links provided and cited above.

Jim