i have a wp page called mysite.com/stuff/

i have a subdirectory on my ftp called mysite.com/stuff/index.html

with a bunch of files and other subdirectories inside.

when i go to mysite.com/stuff/

i want it to show the wp page, but it keeps serving me the contents of mysite.com/stuff/index.html (the subfolder and wp page have the same name)

i need to keep all of the files inside the subdirectory mysite.com/stuff/ accessible via direct links, but just need to serve the wp page instead of the index.html

i need to keep the wp page name url and subfolder name the same, but only serve the wp page and NOT serve index.html. changing permalink structure is not an option at this point.

i tried using the redirection plugin and set source url to /stuff/index.html and target to /stuff/ but it's still serving index.html

please let me know if you have any suggestions. i tried renaming index.html to something else, but then it displays the subdirectory contents as a list of links in the browser, and not the wp page.


  • It wont work. If a directory exists then permalink will not work for same.
    – Robert hue
    Sep 5 '14 at 3:27

Go to your FTP program and open up a file called .htaccess

Sometimes this file can be hidden so be absolutely sure that no files are hidden from showing up.

Go ahead and open up .htaccess and add in "DirectoryIndex index.php" without the quotes. Assuming you didn't rename the default index.php, then this should do the trick. If you've renamed the default index.php file then use "DirectoryIndex customName.php"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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