cattty Posted March 20, 2016 Share Posted March 20, 2016 (edited) Hello everybody, I need to redirect in PS 1.6.0.14 non www to www, I found a code how to make: <IfModule mod_rewrite.c>RewriteEngine on RewriteCond %{HTTP_HOST} !^www\.RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]</IfModule> I have accessed FTP server, but I cannot find anything called as .htaccess () The list is the following: 1_en_0_sitemap.xml 1_index_sitemap.xml 1_it_0_sitemap.xml 1_ru_0_sitemap.xml CONTRIBUTING.md CONTRIBUTORS.md Install_PrestaShop.html README.md cache classes config controllers css download error500.html footer.php header.php img index.php info.php init.php js localization log mails modules override pannello pdf robots.txt sitemap.xml tests themes tools translations upload webservice Any suggestions where to look for it? Google keeps the silence... Thak you in advance Edited March 20, 2016 by FashionDetails (see edit history) Link to comment Share on other sites More sharing options...
endriu107 Posted March 20, 2016 Share Posted March 20, 2016 You can edit it in Preferences > SEO & URLs Link to comment Share on other sites More sharing options...
cattty Posted March 20, 2016 Author Share Posted March 20, 2016 Hello, thank you for your reply. I don't have such a file in SEO&URLs. Link to comment Share on other sites More sharing options...
endriu107 Posted March 21, 2016 Share Posted March 21, 2016 Did you mean generate the .htaccess on the page "SEO & URls"? By toggling friendly URLs? Nope, there he can change domain from domain.com to www.domain.com Link to comment Share on other sites More sharing options...
cattty Posted March 21, 2016 Author Share Posted March 21, 2016 Hello, the friendly URLs I have.This I can also see in SEO and URLs, but on the same page there is nothing like .htaccessv he can I am a girl Link to comment Share on other sites More sharing options...
cattty Posted March 21, 2016 Author Share Posted March 21, 2016 I opened really each folder on the server. There is no such file anywhere. It is really a puzzle! Link to comment Share on other sites More sharing options...
endriu107 Posted March 21, 2016 Share Posted March 21, 2016 You supposed to search in back office not in server. Your nick is not telling us what is your gender Link to comment Share on other sites More sharing options...
selectshop.at Posted March 21, 2016 Share Posted March 21, 2016 I'm a girl too.... Perhaps my logic is better for explain.... If you are searching on FTP you should have the feature /hidden files" activated to ber able to see .htaccess, cause each file with dot before is a hidden file. If you are using filezille for to access the ftp you should select this on tab: "Server" -> see hidden files. If you are using any other FTP viewer, please let me know. What endriu107 and mdekker were telling is: you can change the domain from your back-office without touching any file on ftp with the native function on tab: "preferences -> SEO & URL's" - > domain and URI. Change the domain there to www.yourdomain.xxxx on all 3 fields there. Good luck Link to comment Share on other sites More sharing options...
cattty Posted March 21, 2016 Author Share Posted March 21, 2016 Thank you guys and girls! I understood about the page SEO and URLs. I don't have .htaccess file on that page. I understood that I can change the domain name there, and I saw where to do that. But I have another need - I need to riderect www site to non www because at this moment when I type without www I reciev the following message: "It works!This is the default web page for this server. The web server software is running but no content has been added, yet." The only one way I saw that mdekker used Filezille, so I opened the site also from that source with open hidden files. I found the file But now there is a question how to open it? When I click the right button on it and choose "View", it says that I need to choose the programm to open it. I am afriad to rovvinate something Link to comment Share on other sites More sharing options...
endriu107 Posted March 21, 2016 Share Posted March 21, 2016 Download this file to your comuputer and use to edit it any html editor for example notepad++ Link to comment Share on other sites More sharing options...
cattty Posted March 21, 2016 Author Share Posted March 21, 2016 OK, I found it. The code <IfModule mod_rewrite.c>RewriteEngine on RewriteCond %{HTTP_HOST} !^www\.RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]</IfModule> should I insert here?: ########## Begin - Custom redirects## If you need to redirect some pages, or set a canonical non-www to# www redirect (or vice versa), place that code here. Ensure those# redirects use the correct RewriteRule syntax and the [R=301,L] flags.########### End - Custom redirects There is also a strange thing, I found a lot of written things there for Joomla (before we had the website there) ------------------------------------- ## @version $Id: htaccess.txt 21064 2011-04-03 22:12:19Z dextercowley $# @package Joomla# @copyright Copyright © 2005 - 2010 Open Source Matters. All rights reserved.# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL# Joomla! is Free Software------------------------------------- ########## Begin - Rewrite rules to block out some common exploits## If you experience problems on your site block out the operations listed below## This attempts to block the most common type of exploit `attempts` to Joomla!#-------------------------------------------- # Uncomment following line if your webserver's URL# is not directly related to physical file paths.# Update Your Joomla! Directory (just / for root)# RewriteBase / -------------------------------------------- Begin - Joomla! core SEF Section#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]## If the requested path and file is not /index.php and the request# has not already been internally rewritten to the index.php scriptRewriteCond %{REQUEST_URI} !^/index\.php Does that mean that the site hasn't been moved correctly on Prestashop and we are still connected with Joomla? Link to comment Share on other sites More sharing options...
selectshop.at Posted March 21, 2016 Share Posted March 21, 2016 Before you edit this file: You are using joomla together with Prestashop on same webspace ? Please explain your architecture before we suggest you any change on .htaccess. Joomla is running what ? Prestashop should be run together or replace hoomla project ? Link to comment Share on other sites More sharing options...
selectshop.at Posted March 21, 2016 Share Posted March 21, 2016 The best wqay for to redirect a domain is to do this on the DNS panel of the domain and not as extra after on a .htaccess file. Why ? Each time customer types www.your domain, this request will be sent to your DNS server (domain name server). This server will deliver the request to your server on where the domain is hosted. After this the request reads the .htaccess and redirects to without www. Therefore the best way is to redirect directly to the domain name server instead after. This is quicker and you will not have to change one or more .htaccess files. Link to comment Share on other sites More sharing options...
cattty Posted March 21, 2016 Author Share Posted March 21, 2016 You are using joomla together with Prestashop on same webspace ? Please explain your architecture before we suggest you any change on .htaccess. We had a site on Joomla (VirtuMart). We decided to move to Prestashop. Since we were updating the stock database, we decided to download the products from that database, not from the old site (so, basically, it wasn't a migration, but a sort of creating a new site). Joomla project is finished. We have one shop in 3 languages and one domain. I don't know why and how Joomla appears on Prestashop file. I also don't know how it affects the performance of current shop on Prestashop. The work was done by an agency found among Prestashop partners The best wqay for to redirect a domain is to do this on the DNS panel of the domain You are very kind, thank you very much! Should I contact the provider to ask to do that? So, should I say "PLease, make redirect from non www site to www site". I am asking this because I am not a web master, and just to be sure that I ask the right thing Link to comment Share on other sites More sharing options...
selectshop.at Posted March 22, 2016 Share Posted March 22, 2016 The .htaccess you added to your post is a joomla one The best way to have a clean project is: delete all what is joomla if you will not use it, to don't get in confusion. make the rewrite directly to the DNS of your URL. It is a simply entry on the A-records . Yes ask your provider or admin of URL to make this entry on the record. After this new entry to the A-records (can take 24 hours to take effect), the only thing what YOU should than do, is to manage the URL on Google webmaster account by setting the preference for the SERP to WITHOUT www, but this only for better and clear SEO. 1 Link to comment Share on other sites More sharing options...
cattty Posted March 22, 2016 Author Share Posted March 22, 2016 Thank you very much for your help! The Joomla info has been removed The site has been redirected via provider. In Search Console we have a set up with www Google Web Mater I still didn't touch to investigate, I will do these days. Thanks again for all you precious help Link to comment Share on other sites More sharing options...
Moodah Posted March 25, 2016 Share Posted March 25, 2016 You can edit it in Preferences > SEO & URLs Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now