php - Redirect Prestashop 1.5 from subfolder to the root -
i have prestashop 1.5.x installed in subfolder, not in root. want accesible root directory, edited .htaccess file set rewritecond , rewriterule change main domain , subfolder. works, instantly redirects main domain store.
# copy , paste following code .htaccess file # in public_html folder of hosting account # make changes file according instructions. # not change line - rewriteengine on rewriteengine on # change yourdomain.com main domain. rewritecond %{http_host} ^(www.)?mysite.com$ # change 'subfolder' folder use main domain. rewritecond %{request_uri} !^/prestashop/ # don't change line. rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d # change 'subfolder' folder use main domain. rewriterule ^(.*)$ /prestashop/$1 # change yourdomain.com main domain again. # change 'subfolder' folder use main domain # followed / main file site, index.php, index.html, etc. rewritecond %{http_host} ^(www.)?mysite.com$ rewriterule ^(/)?$ prestashop/index.php [l]
my question: correct way, or better redirect using index.html javascript this:
<head> <script type="text/javascript"><!-- location.replace("http://maindomain.com/shop/index.php") //--> </script> <title></title> </head>
my concerns how make prestashop pages seo-friendly, store searchable when installed in subfolder. or better move store subfolder root?
rewritting different form redirecting.
the .htaccess way better javascript redirect. save client useless request.
Comments
Post a Comment