n my site root directory. there are donghua.php and index.php. now, is there a way to use .htaccess file to let the visitor access my site .the default showsexample.com/donghua.php. not example.com/index.php. thank you. the server is Apache.
So… the problem is that index.php redirects to donghua.php, but you don’t want that to happen?
If that’s your question, then we’re going to need more information. Either one of your other htaccess rules is causing the redirect, or something in index.php is causing the redirect. We can’t check either one unless you show them to us.
in donghua.php i invoke a flash. so i want to when the user access the site it will show the flash. there is a link on the flash. (enter the site)example.com/index.php
That’s weird, it shouldn’t!
Try clearing your cache to ensure that your browser hasn’t cached a previous redirect.
Here’s an example demonstrating that it does work.
I created a directory entitled “directoryIndex-example”
In this directory I placed three files, “index.php”, “donhua.php” and a .htaccess file.
The .htaccess file contained this:
Saying all of that, I find John’s solution much better, as it gives your visitors a choice in what they look at.
Also, remember that iOS devices don’t support Flash.