simcoweb Posted January 10, 2013 Share Posted January 10, 2013 I've set up a Wordpress site and because it contains some adult oriented materials I've had to put up a splash page with a disclaimer. The Wordpress installation is in the root folder, same as the splash page. I named the splash page as index.html. The 'home' page for Wordpress is index.php. On the splash page is a link to index.php (to enter the site) but it just keeps loading the splash page (the index.html) even though the button link is hard-coded to index.php. Furthermore, once inside the site, if you click the 'Home' button in the menu it takes you back to the splash page even though it is also hard-coded for index.php. I'm looking for the htaccess snippet that will identify these two pages and extensions as separate instead of confusing the index.html with the index.php which are probably, by default, both listed as default home page designations. The .htaccess file contains the common permalinks mod_rewrite rules as follows: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress To summarize, i'm in need of the instructions that would identify these two file extensions as separate and allow for the links going to index.php to parse properly. Any help would be dyn-o-mite. Thanks in advanced, people! Quote Link to comment https://forums.phpfreaks.com/topic/272983-have-a-splash-page-in-addition-to-a-home-page/ Share on other sites More sharing options...
jonsjava Posted January 16, 2013 Share Posted January 16, 2013 Add this as the first line of your .htaccess file: DirectoryIndex index.html index.php This will set it so that .html has priority over .php files as the default index file. Quote Link to comment https://forums.phpfreaks.com/topic/272983-have-a-splash-page-in-addition-to-a-home-page/#findComment-1406243 Share on other sites More sharing options...
nikoslefkas Posted October 18, 2013 Share Posted October 18, 2013 Hello, i add this : DirectoryIndex index.html index.php in my .htaccess file but when i click on the link to open the index.php file it opens the index.html again... ! How i can resolve this problem ? Quote Link to comment https://forums.phpfreaks.com/topic/272983-have-a-splash-page-in-addition-to-a-home-page/#findComment-1454449 Share on other sites More sharing options...
Irate Posted October 19, 2013 Share Posted October 19, 2013 Rename index.php to index2.php? Quote Link to comment https://forums.phpfreaks.com/topic/272983-have-a-splash-page-in-addition-to-a-home-page/#findComment-1454526 Share on other sites More sharing options...
Adam Posted October 20, 2013 Share Posted October 20, 2013 Why don't you have index.php (or every page) display the splash page instead of the normal site when the user doesn't have a cookie set? Seems a better safe guard than relying on them going through the home page, given it's a disclaimer. Also means you don't have to mess around with Apache configuration to go against the normal behaviour. Quote Link to comment https://forums.phpfreaks.com/topic/272983-have-a-splash-page-in-addition-to-a-home-page/#findComment-1454575 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.