I want to move all the files of my website (even including index.php) to a subdirectory (for exp: "abc")
For example BEFORE:
public_html index.php a.file directory an.other.file ...
AFTER:
public_html abc_directory index.php a.file directory an.other.file ...
I want everything to work as before, but I don't want to do any redirects (visible).
People should enter " http://myexmaplesite.com/directory/an.other.file/ " and serve them through .htaccess apache " http://myexmaplesite.com/abc_directory/directory/an.other.file/ " BUT WITHOUT EXTERNAL TRANSMISSIONS (301.302 etc.)
How could I redirect all requests to a subdirectory using mod_rewrite?
mod_rewrite :
RewriteEngine on RewriteRule !^directory/ directory%{REQUEST_URI} [L]
:
RewriteEngine on RewriteCond $1 !^directory/ RewriteRule ^/?(.*) directory/$1 [L]
.
-
RewriteEngine On RewriteBase / RewriteRule ^(.*)$ directory/$1 [L,QSA]
Source: https://habr.com/ru/post/1722877/More articles:Get image from uiview - iphoneКак изменить параметры по умолчанию для newfit() в MATLAB? - performanceCannot connect to MySQL database from tomcat - mysqlWeb Services Security - mysqlHow can I talk to Firebug from a web worker? - javascriptThe Microsoft.Jet.OLEDB.4.0 provider is not registered on the local machine - c #How can I simulate a backspace action in a text box? - javascriptКак я могу получить доступ к 64-битной информации о кустах реестра из приложения, работающего в 32-битном режиме на 64-битной машине (WOW) с использованием WMI через С# - c#Oracle 64-bit client for v8 database - oracleCombine Java Sort - javaAll Articles