I have PrestaShop 1.7.8.7
My application is located in /public_html/home.
I assigned domain to catalog /home, but to access my website I need to use url domain.com/home/ to access homepage.
How do I make it just domain.com?
You'll need to move your Prestashop installation files from the /public_html/home directory and put it everything in /public_html directory.
Then you'll have to change the "physical_uri" value in ps_shop_url database table from /home/ to /
You can either do this directly from DB or from Backoffice in the "Seo&Url" section.
Make sure to save your settings afterwards so a new .htaccess file will be regenerated in the web folder root with correct paths.
Related
to give you some context with where I'm at, I have set up a subdomain to serve the images for my site on www.images.mysite.com
This "images" subdomain is intended to serve the images to primary domain www.mysite.com (being located on the server at "/public_html") and also the Woocommerce subdomain www.shop.mysite.com (being located on the server at "/public_html/shop").
I have uploaded the images from the old directory (which is currently still in use) on the server at "/public_html/wp-content/uploads" to the new directory connected to the www.images.mysite.com subdomain at "/public_html/images/wp-content/uploads"
The challenges I'm facing at this stage is that I can't seem to get the images to upload to the www.images.mysite.com location when sent from the www.mysite.com Wordpress installation or the www.shop.mysite.com Wordpress installation even after adding the path for this to 'options.php' for both the www.mysite.com Wordpress installation or www.shop.mysite.com Wordpress installations.
When I did set this path earlier though 'options.php' (through www.mysite.com/wp-admin/options.php pointing to www.images.mysite.com without the trailing slash) it caused conflicts with the www.mysite.com and www.shop.mysite.com sites and dropped all the images from both the www.mysite.com Wordpress installation and the www.shop.mysite.com Wordpress installations. When I removed the path from the ‘options.php’ file the installations both worked fine again.
I have had the process of setting this up explained to me as:
*Imagine you want the images for www.shop.mysite.com to be loaded from www.images.mysite.com The document root folder for www.shop.mysite.com is /public_html/shop - for the images it's /public_html/shop/wp-content (Note: I think this is supposed to be /public_html/images/wp-content but correct me if I'm wrong).
In such case, we need to change the document root for www.images.mysite.com to that one -> public_html/shop/wp-content. Once done, inside the wp-config.php for www.shop.mysite.com, you would need to add the following code: define("WP_CONTENT_URL", "http:// images.mysite.com"); define("COOKIE_DOMAIN", "shop.mysite.com"); Once done, from phpmyadmin, in the database for www.shop.mysite.com (XXXXXX21_wp451) -> there is a tool named SQL at the top where you can run queries. This would be the needed query -> UPDATE wp_posts SET post_content = REPLACE(post_content,'www. shop.mysite.com/wp-content/','images.mysite.com/')*
The explanation above seems a bit out to me with the note I added as bolded.
I'm running HTTPS - should the code above state that?
There are some spaces in what I have been provided here that I'm not sure if they will have an impact on the execution.
I have a dummy site that I can use which won't cause any major issues if I break it which i'll test this in. If anyone has any pointers they would be greatly appreciated :)
take a backup for your database and files and do as this article explains:
Login to your hosting account and launch “phpMyAdmin” section under cPanel. Open the database of your main domain. Select “wp-options” table and replace the following two parameters and save your settings.
upload_path ==> directory root for your subdomain
upload_url_path ==> actual URL path for your subdomain
Until this step there will be no impact on your live site since the existing media upload folder is not changed. Any new image you upload henceforth will be stored in a new subdomain path you have entered in the “wp-options” table. You can cross check this by uploading a test image and check the URL. Once you modified the upload path in “wp-options” table you can see the upload path options are enabled in WordPress admin frontend under “Settings > Media“. Henceforth you can update the uploads file path directly here.
then you will have to replace images links by running this SQL query:
UPDATE wp_posts SET post_content = REPLACE(post_content,'URL of current media folder','URL of new media folder')
I have a website with a structure created by users depending content. That structure is something like this:
www.domain.com/
www.domain.com/vehicles/
www.domain.com/vehicles/vehicles.html
www.domain.com/vehicles/cars/
www.domain.com/vehicles/cars/cars_x.html
www.domain.com/vehicles/bikes/
www.domain.com/vehicles/bikes/bikes_new.html
www.domain.com/vehicles/bus/
www.domain.com/vehicles/bus/bus_big.html
Site is working properly, well seo indexed but sometimes, users or visitors write down wrong addresses like www.domain.com/vehicles/cars or www.domain.com/vehicles/cars/ and that returns a 404 page not found or 403 directory listing forbidden.
Its possible (with htaccess) to tell apache to get the first or only html file on directory if directory exists by default? in pseudocode
if www.domain.com/vehicles/cars is directory
and www.domain.com/vehicles/cars has not default page (index.html/index.php)
get 1st/only .html file at directory for serving it.
bts, its not possible to create or add an index.html/index.php in every directory due its dinamically created by editors and they decide the file names.
Thanks!
My domain is in godaddy and web hosting is in 1and1 webserver. I have used prestashop and installed prestashop in webserver in subfolder called prestashop. When i installed prestashop to my site i used mydomain/prestashop/install and completed the installation processes. Now, when i try to open my website www.mydomain.com is opens www.mydomain.com/defaultsite. but if i type www.mydomain.com/prestashop/index.php my website home page opens. I want my site open when i just type www.mydomain.com. Can anyone please help me. My DNS server propagation is completed.
It seems that you have uploaded the Prestashop folder in your root folder. The documentation given below has some language error. It should be upload data of PrestaShop folder at the root folder
From the installation documentation for Prestashop 1.6 and Prestashop 1.7
Your needs:
If you want your shop to be the main website for your domain name (i.e., http://www.example.com), upload PrestaShop at the root folder of the upload space (which may depend on the host).
If you want your shop to be in a sub-folder of your domain name (http://www.example.com/shop), you must first create a folder through FileZilla (right-click and choose "Create directory"), then upload PrestaShop in that folder.
If you want your shop to be in a sub-domain of your domain name (http://shop.example.com), you must first create a sub-domain. This depends on your host: you might be able to do it simply by adding a new folder with your FTP client, or you might have to create the sub-domain through your host's administration panel. Read your host's support documentation first. Once created, browse to the sub-domain's folder, and upload PrestaShop there.
I am using Apache server. Usually when I want to start a new website project, I created a new folder inside my server directory and inside that folder I would have 'index.html or index.php'. When I direct my localhost URL to that folder, it would open it and automatically display index.php.
Now I am trying something new with this CakePHP framework. I finished setting it up, and when I direct my localhost URL to folder 'cakephp-cakephp' (folder containing all the cakePHP files), it then shows me this message:
Release Notes for CakePHP 2.0.0-dev.
Your tmp directory is writable.
The FileEngine is being used for caching. To change the config edit APP/config/core.php
Your database configuration file is present.
I think the next step here is to start the development by saving all my files to "app" folder. But the message is not gone even when I deleted the default index.php files from inside the folder 'cakephp-cakephp'. It seems anyway, the index.php files do not actually generate the message.
Does anybody know what file generates that release notes message? I want to delete that file so that I wont get the message (which I believe is triggered by some default file like 'index.php') when I access folder 'cakephp-cakephp', and then it will show me the file directory inside that folder instead, and I can traverse file directory easily using my browser and access my app folder, in which I am planning to store my index.php file, and save all my development files..
You cannot delete the index.php files and you usually don't modify those files unless you need to do some special configuration. Adding the file app/views/pages/home.ctp gets rid of that message and becomes your default home page.
Also, as stated in the comments, you should really read the manual and try the tutorial.
http://book.cakephp.org
What do I need to do to change the default page in cpanel?
Update or create .htaccess file in the public_html folder and make the following content..
DirectoryIndex index.php home.php
If you are referring to the default apache cPanel page then you will need whm access for that
WHM >> Main >> Account Functions >> Web Template Editor
Here you can change the default page, suspended page etc.
Assuming you are referring to the default page when an account is created, this is easily done by creating an index.html or .php page within your /etc/skel folder (assuming you have a VPS or dedicated server).
There is a setting within WHM that allows for it in case you are not CLI savvy.
Hope this helps, sorry for the delayed response, but I'm new and trying to build my rep up!
You can create custom branded login pages for cPAnel and WHM by using the advanced branding features of cPanel. cPanel also supports custom login pages for each reseller's accounts. Linked Below is the documentation.
http://docs.cpanel.net/twiki/bin/view/AllDocumentation/WHMDocs/CustomBrandedLoginPages
how to create cpanel default page for hosting domains.
create default html page and upload the files in Skeleton Directory on cpanel root domain.
http://www.motherhost.in/members/knowledgebase/22/how-to-change-default-page-in-cpanel.html
The skeleton directory ( Skeleton Directory: A directory that defines what files and subdirectories new accounts will have by default. When the account is created, the new user’s account will contain an exact copy of the skeleton directory.) exists to let you easily copy the same files into every new account’s public_html and public_ftp directories when the account is created.
Keep in mind that:
When a visitor accesses http://example.com, he will see the contents of example.com 's public_html directory.
When a visitor accesses http://example.com/subdirectory, he will see the contents of public_html/subdirectory.
Contents of the public_ftp directory are available for anonymous FTP users to download.
This WHM feature simply states the location of the skeleton directory (/root/cpanel3-skel).
To set up your skeleton directory:
These files will be accessible to the new user via an FTP client.
Decide what kind of default setup you would like your new users to have.
Place the appropriate subdirectories and HTML files in /root/cpanel3-skel/public_html.
These files will be copied to new accounts’ public_html directories when accounts are created.
Place the appropriate FTP-related files in /root/cpanel3-skel/public_ftp.
These files will be accessible to the new user via an FTP client.