WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I rename index.php to home.php and put a flash in index.php. In the flash I make an effect and after it played 5 minutes it redirects to home.php.

I put this code:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /home.php [L]

in my .htaccess file.

I turned on the permalinks to example.com/sample-post and all the posts links are ok. But example.com/home.php is not ok. If I set permalinks to example.com/?p=123 all the links are not ok. The example.com/home.php is ok. The home page content is from themes/mytheme/index.php.

How to correct example.com/home.php?

what i want:

i want to add a flash to my site,namely,when access my site, first shows the flash, after some minutes,then redirect to the home page. on the flash, there is a link "enter to the website".

the way i am able to think is the following, in the flash i add code

stop();getURL('example.com/index.php','_self'). then create a file named index.php. put the invoke flash code in it. then rename the default index.php name to "fhp.php".

but it's not work. how to correct it?

share|improve this question

how to correct example.com/home.php?

First, put things back the way you found them. Both index.php and home.php are reserved file names. And index.php is special not only to WordPress but to the server itself-- look into DirectoryIndex. You should not be manipulating them in this way. Unless you really know what you are doing you will cause trouble for yourself.

If you want to force your user to watch your Flash animation, which I strongly discourage-- I would leave your site and never return, plus iOS does not support Flash and Adobe has stopped making the mobile player for Android-- you probably want something like:

function force_feed_flash() {
    if (is_home() || is_front_page()) {

Your Flash player can redirect back to the proper site when it is done. I am not sure I have the condition for the redirect right, but you should be able to work out when you want the redirect to occur and when you don't.

share|improve this answer
when i change home.php to homepg.php. it still not work.why – linuxlearner Mar 30 '13 at 0:55
i put your code in function.php. the home page still not work. – linuxlearner Mar 30 '13 at 1:21
i put a link in the flash. "enter the site" the code is stop();getURL('example.com/index.php','_self'). but it redirect to example.com/home.php – linuxlearner Mar 30 '13 at 1:27
If this post is an indication, what you have done is not what I said to do. – s_ha_dum Mar 30 '13 at 3:01
i tried you have told,it doesn't work. when i access the home page. – linuxlearner Mar 30 '13 at 4:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.