Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Index of folder in wordpress .htaccess

When I use the following url "http://www.tuto3d.netai.net/wordpress/" in my navigator I access normally my wordpress site but when I use http://www.tuto3d.netai.net/ I get the index of folder instead and a link to wordpress folder. I want to redirect in my .htaccess the http://www.tuto3d.netai.net/ to the "http://www.tuto3d.netai.net/wordpress/"

and this is my my .htaccess

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>

# END WordPress

Thank you in advance

like image 455
Nejmeddine Jammeli Avatar asked Oct 06 '13 10:10

Nejmeddine Jammeli


1 Answers

Have this rule in your DOCUMENT_ROOT/.htaccess:

RewriteEngine On
RewriteRule ^$ /wordpress/ [L,R=301]
like image 122
anubhava Avatar answered Nov 15 '22 10:11

anubhava