I
I
Ivan Sokhin2015-03-13 19:30:09
Apache HTTP Server
Ivan Sokhin, 2015-03-13 19:30:09

How to hide folder in url?

There is a show.php file, it is in the modules folder, and how can I display it at site.com/show.php? Now available at site.com/modules/show.php. In .htaccess I made it so that there would be a redirect, but how can I make it so that "/modules/" is not displayed in the path?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Sokhin, 2015-03-13
@jarrro

Found the answer:

RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} !^/modules/
RewriteRule ^(.*)$ /modules/$1

A
Andrey Burov, 2015-03-13
@BuriK666

do not redirect (remove R=301)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question