.htaccess - trailing slash and non www to www -
hi have wrote below , not right cant figure out what.
what needs happen url not have / on end needs have /
and non www needs www
issue 1, not seem adding trialing slash end of lets /thank-you
issue 2, when go mydomain.com/thank-you/ www.mydomain.com/thank-you.php/
thanks in advance
rewriteengine on rewritecond %{env:redirect_status} 200 rewriterule .* - [l] rewritecond %{http_host} !^www\. rewriterule ^(.*)$ http://www.%{http_host}/$1 [r=301,l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-l rewritecond %{request_uri} !(.*)/$ rewriterule .* http://%{http_host}%{request_uri}/ [r=301,l] rewriterule ^thank-you/?$ thank-you.php [l] rewriterule ^thank-you.php$ http://%{http_host}/thank-you/ [l] rewriterule ^/?$ index.php [l] rewriterule ^index.php$ http://%{http_host}/ [l]
.htaccess
No comments:
Post a Comment