My URL was
but i have to redirect it to child folder, URL as
i have redirect it in htaccess as
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP_HOST} ^(www.)?demo.example.com/parentFolder$ RewriteCond %{REQUEST_URI} !^/ChildFolder/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /ChildFolder/$1 #RewriteCond %{HTTP_HOST} ^(www.)?demo.example.com/parentFolder$ RewriteRule ^(/)?$ ChildFolder/ [L] </IfModule> but didn't remove sub folder(ChildFolder) from URL. i want to access childFolder after redirect but want to hide childFolder from URL.
RewriteCond %{HTTP_HOST} ^(www.)?demo.example.com/parentFolder$will never match asHTTP_HOSTmeansyour domain namenot the path.