D
D
Darklt2019-10-08 00:57:28
Drupal
Darklt, 2019-10-08 00:57:28

How to make a physical folder in drupal inside a virtual one?

Hello, tell me there is Drupal, it has a directory, for example site.name/uslugi/
The fact is that I need to create my own separate page on a different engine at site.name/uslugi/new_usluga/. but if I physically create a folder, everything stops working inside the virtual / uslugi /

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2019-10-08
@dodo512

Add a redirect /uslugi/new_usluga/ to another folder and put this rule above the Drupal CNC.

RewriteRule ^uslugi/new_usluga/$ /folder/index.php [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^ index.php [L]

If you really really need to physically create the /uslugi/new_usluga/ folder, then with the help [OR]you can bypass the folder existence check RewriteCond %{REQUEST_FILENAME} !-d.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^/uslugi/ [OR]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^ index.php [L]

And then it DirectoryIndexwill do its job and when requesting the existing /uslugi/new_usluga/ folder, /uslugi/new_usluga/index.php will be called. The remaining requests, as before, will be processed by index.php in the root of the site.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question