AKor
AKor

Reputation: 8892

.htaccess Redirecting

I'm trying to make redirects on my server using .htaccess files.

My hierarchy is like this:

File Folder > contains .htaccess and /file/ directory

If someone goes to File Folder, I want it to redirect from just / to /file/ using the .htaccess. How do I do that?

Upvotes: 0

Views: 217

Answers (1)

0x60
0x60

Reputation: 1096

RewriteEngine On
RewriteRule ^file/$ / [L]

Upvotes: 1

Related Questions