Title: directory/folder 301 direct failed
Last modified: August 22, 2016

---

# directory/folder 301 direct failed

 *  [ben3486](https://wordpress.org/support/users/ben3486/)
 * (@ben3486)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/directoryfolder-301-direct-failed/)
 * Hi all,
 * I’m trying to create a 301 redirect from a directory ‘/fr/’ to ‘/fr/page.php’.
   When I’m typing ‘www.domain.com/fr/’ in my browser, it displays the index of 
   all the files of the /fr/ directory, and I would like to avoid this.
 * All the 301 redirects (webpages) are correctly working ‘/fr/page1.php’ to ‘/fr/
   page2.php’.
 * Can anybody help me with that issue?
 * Thanks,
    Ben
 * [https://wordpress.org/plugins/simple-301-redirects/](https://wordpress.org/plugins/simple-301-redirects/)

Viewing 1 replies (of 1 total)

 *  [AncaIO](https://wordpress.org/support/users/ancaio/)
 * (@ancaio)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/directoryfolder-301-direct-failed/#post-5282206)
 * Hi Ben,
 * If all you want to do is prevent public access to your fr directory, you could
   try putting an index.php file in that folder, containing:
 *     ```
       <?php
   
       //Nothing else
       ```
   
 * This usually prevents the display of files in the directory. Also, if it’s a “
   bad fix” you can just delete it afterwards.
 * **Warning**: Make sure not to overwrite an existing index.php file. If you already
   have another one, make a copy of it. If this is the case, you might also need
   some other for disallowing access.

Viewing 1 replies (of 1 total)

The topic ‘directory/folder 301 direct failed’ is closed to new replies.

 * ![](https://ps.w.org/simple-301-redirects/assets/icon-256x256.jpg?rev=2783827)
 * [Simple 301 Redirects By BetterLinks - Easy WordPress Redirect Manager for Redirects, 404 Error Log & More](https://wordpress.org/plugins/simple-301-redirects/)
 * [Support Threads](https://wordpress.org/support/plugin/simple-301-redirects/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-301-redirects/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-301-redirects/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-301-redirects/reviews/)

## Tags

 * [301 redirect](https://wordpress.org/support/topic-tag/301-redirect/)

 * 1 reply
 * 2 participants
 * Last reply from: [AncaIO](https://wordpress.org/support/users/ancaio/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/directoryfolder-301-direct-failed/#post-5282206)
 * Status: not resolved