S
S
Sergey2014-08-24 19:55:30
Apache HTTP Server
Sergey, 2014-08-24 19:55:30

What's wrong with RewriteRule in .htaccess?

I want pages like site.ru/page.php to be displayed like site.ru/page/
What's wrong with my .htaccess?

RewriteEngine on
RewriteBase /
RewriteRule /(.*).php /$1/ [R=301, L]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SixFingers, 2014-08-28
@SixFingers

So it will transfer to /page/, but it will already be a folder.
So it will transfer to /page, it will be a file, but php will not start in it.
RewriteRule (.*).php$ /$1 [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question