Я новичок в Apache, у меня следующая структура каталогов:
html
|-- moodle
|-- singapur
|-- app
|-- public
|-- js
|-- css
|-- img
|-- index.php
Мне нужно перенаправить с www.mywebpage.com/singapur
на www.mywebpage.com/singapur/public
.htaccess
, расположенный впапка singapur
:
Options -Indexes
<IfModule mod_rewrite.c>
Options -Multiviews
RewriteEngine On
RewriteRule ^(/.+)$ /public/index.php?url=$1 [L]
</IfModule>
.htaccess
, расположенная в папке public
:
<IfModule mod_rewrite.c>
Options -Multiviews
RewriteEngine On
RewriteBase /singapur/public
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]
</IfModule>
Спасибо