I am rewriting sub-folders of my website to sub-domain via bellow code in Apache
vhost file:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. example.com
RewriteCond %{HTTP_HOST} ^(www\.)?(([^\.]+)\.){1}example.com$
RewriteCond /var/www/example.com/web/crm/build/%3 -d
RewriteRule ^/(.*) /crm/build/%3/$1
so https://example.com/web/crm/folder
= https://folder
.example.com
Also i am using .htaccess
to hide /index.php/ in codeigniter
url
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
AddDefaultCharset utf-8
example.com/web/crm/folder
works fine
folder.example.com
i get 505 internal error which gets fine once i delete lines in .htaccess or just simple access website via folder.example.com/index.php/ (Nothing is showing up in log)
I want to fix rewrite conflict for sub domain