.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

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -