Jump to content

Where To Find .htaccess On Ftp Server


Recommended Posts

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 by FashionDetails (see edit history)
Link to comment
Share on other sites

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

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

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 script
RewriteCond %{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

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

 

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

The .htaccess you added to your post is a joomla one :D;)

 

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.
  • Like 1
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...