R
R
Red Rain2016-02-18 16:53:53
Apache HTTP Server
Red Rain, 2016-02-18 16:53:53

How to make URL with missing folders in mod_rewrite?

For example, a person comes to a site where he clicks the site.ru/hellokitty link , this should direct him to the site.ru/mydir folder , which is unknown, so the link in the browser should still be displayed as site.ru/hellokitty . If you do this:

RewriteCond %{REQUEST_URI} hellokitty
RewriteRule ^hellokitty$ /mydir

then a simple redirect will happen, and the line in the browser will change to site.ru/mydir . Is it even possible to hide a directory without resorting to PHP features?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2016-02-26
@shambler81

yes you need to do it in nginx

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question