PeraMika
PeraMika

Reputation: 3688

XAMPP - Rewrite Rule doesn't work

I am using XAMPP (Windows 7) and in httpd.conf I have:

In htdocs directory I have subdirectory called shop where is my website. Inside shop I have one more subdirectory called shirts containing the file:

To open it you just neet to enter the following url: http://localhost/shop/shirts/shirts.php

But, when I open just http://localhost/shop/shirts/ - browser displays a directory listing, and I want it to open shirts.php.

So, inside /shirts directory I created the following .htaccess file:

RewriteEngine On
RewriteRule ^shirts/$ /shop/shirts/shirts.php

But it doesn't work. Do you know what I'm doing wrong, why is this not working?

Thanks in advance!

Upvotes: 0

Views: 256

Answers (1)

Konstantin
Konstantin

Reputation: 71

Try write this DirectoryIndex index.php shirts.phpin your .htaccess file

Upvotes: 1

Related Questions