.htaccess - Redirecting to rewritten URL -
when user visits mysite.com, i'd them taken mysite.com/welcome. address rewritten version of mysite.com/index.html it's appending /welcome onto address.
i've tried using redirect in .htaccess loops continuously. there way achieve , still keep index.html welcome page?
rewriteengine on rewriterule ^welcome$ /index.html [l] redirect 301 / /welcome
try instead:
rewriteengine on rewriterule ^$ /welcome [r=302,l] rewriterule ^welcome$ /index.html [l] first line redirects request made root /welcome. second rule internally rewrites /welcome index.html.
Comments
Post a Comment