Jump to content


Photo

Have a splash page in addition to a home page


  • Please log in to reply
1 reply to this topic

#1 simcoweb

simcoweb

    Advanced Member

  • Members
  • PipPipPip
  • 1,094 posts
  • LocationCA

Posted 10 January 2013 - 06:20 PM

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!

#2 jonsjava

jonsjava

    Advanced Member

  • Members
  • PipPipPip
  • 1,563 posts

Posted 16 January 2013 - 05:52 PM

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.
I started programming in PHP because I needed money for food. Now, I'm so busy programming I don't have time to eat!
Adding
or die ( "Query failed due to: ".mysql_error())
to your mysql queries will save you a lot of time and grief. ___ JonsJava.com




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com