.htaccess - RewriteRule gives HTTP 500 error -


on website, www.example.com/ shows files in /, root folder. want example.com/ shows files in /www/. add following code in .htaccess file :

rewritecond %{http_host} ^www.example.com$ rewriterule ^(.*)$ /www/$1 [l] 

but displays 500 error. me wrong ?

try code :

rewritecond %{http_host} ^www.example.com$ rewritecond %{request_uri} !^/www/ rewriterule ^(.*)$ /www/$1 [l] 

it rewrite url once , stop redirection loop.


Comments