Is there a way to get this by .htaccess file?

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 shows not thank you. the server is Apache.

ps:The user still can access

i using

DirectoryIndex donghua.php 

in the .htaccess. the default page is ok. but when i access it redirect to if i forbid it redirect how do i do?

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.

when access the site( i want it shows the content( and when i access [B][/B] directly, it also work.

Is this what you want to happen when these URI are called:

  1.” goes to “

  2.” goes to “

  3.” goes to WHERE EXACTLY

yes, you are right. go to

Why not follow standard practise and make items one and three activate index.pup and donhua.php to go to a separate page?

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)

I have searched and unable to find a .htaccess solution to your problem.

Can you post a link to your site and other posters may be able to help.

i want to access the site( shows the flash . then click enter the site(at bottom of the site.) the site is made by wordpress.

Why not have a splash screen with two links:


Create a .htaccess file in the root of your website and add this line to it:

DirectoryIndex donhua.php

This should do what you want.

this made you can’t access when your access it will redirect to

how to make when the user open the site. it shows

Just modified the link:

  1. No .htaccess required
  2. index.php now has source displayed at the bottom of the page
  3. index.php has two buttons, one links to the donhua.php the other to a new index_main.php
  4. index.php now loads very quickly

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:

DirectoryIndex donhua.php

Now, if you go to the following url, you are directed to donhua.php

However, if you navigate to either file directly, then things still work as expected:

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.