FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


changing default start page





inphurno
i know that by using htaccess and the command DirectoryIndex you can change your default start page but the problem with this is that it is inherited into other subfolders. i was looking for a way to forward traffic from http://whatsyourimpact.eu.org/ to http://whatsyourimpact.eu.org/start.php

i tried this but it didnt work:
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^$ /start.php [L]

any suggestions on how to do this?

thanks in advance
albuferque
Take a look at this post by jdMorgan:

http://www.webmasterworld.com/forum92/718.htm

Regards
inphurno
First of thanks for your response. Very Happy i looked at the post and i wasnt sure what part i should do, so i tried add this to my htaccess:

RewriteCond %{HTTP_HOST} ^whatsyourimpact\.eu.org
RewriteRule ^$ /start.php [L]

this didnt seem to change anything

then i tried this part of the post:

RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^whatsyourimpact\.eu.org
RewriteCond %{REQUEST_URI} !^/start\.php
RewriteRule .* /start.php [L]

this worked but forced every request to the first level, like whatsyourimpact.eu.org/index.php or whatsyourimpact.eu.org/contact.php to go to whatsyourimpact.eu.org/start.php. i only want this to happen when the request is to whatsyourimpact.eu.org/ and any other request like whatsyourimpact.eu.org/index.php or whatsyourimpact.eu.org/contact.php should not be sent to whatsyourimpact.eu.org/start.php

thanks in advance
albuferque
Well, I'm not sure if this is what you need, but maybe you could try a 301 redirect, just put in your .htaccess:

redirect 301 /index.html http://www.domain.com/start.php

You want to create a dummy index.html file.

Hope that helps.
inphurno
while this is a good work around, this wasnt the type of solution i had in mind. there has to be a way to re-define what is the start page. there is a default order thats followed index.html, index.htm, index.php etc... has to be something or someway to change that Smile
albuferque
Ok, you want to try this:
Put this in your .htaccess

DirectoryIndex start.php index.php index.html index.htm


Best regards
inphurno
thanks for your post albuferque. this will work but will also make start.php the default for all the folders beneath the top level which is not good for what i need. is there maybe a way to restrict this rule to only the top folder?
Related topics
How To : Secure Your PHP Website
AJAX tutorial
Changing default cpanel theme to bluelagoon?
LIVE, come check it out!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Virus Problem
how to change the default index page
Review: GNOME 2.14 (from Linux.com)
Is it a Virus?!?!
Joomla! - Installation Tutorial
What is your browsers start page?
changing default home directory
Apache
why Firefox isn't answer 4 every webpage displayed?
Changing default keyboard on ubuntu 5.04
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.