How to redirect in Magento? - magento

I am new on Magento. I am facing some problem when open the site in browser.
I am having two sites:
http://www.diamondjewelryhub.com
http://musicalinstruments101.com/
I have download the code and database of http://www.diamondjewelryhub.com. I want to upload this code and database on the server of http://musicalinstruments101.com/.
After download the data base I searched for this http://www.diamondjewelryhub.com and replace with http://musicalinstruments101.com/.
After that I have import the database file on the server of http://musicalinstruments101.com/, When I am trying to open http://musicalinstruments101.com/ it redirecting on the site http://www.diamondjewelryhub.com.
Is there any change needed because it redirects wrong?

You have to change/delete the unsecure_url and secure_url from core_config_data table to be able to access your store on different url

When copying the files onto the new server remember to not copy the contents of var/ directory. That would include the cache which effectively overrides the database.

Related

How to run magento files on local server?

I have done one work which is stored in the webserver. I downloaded all the files and the database and uploaded onto the local server.When I am typing the local server url ,its going to the web server url.Also when i am logging onto the admin panel in magento in local server, its going to the admin panel in the webserver.How can it be corrected ? Actually I am new to Magento.
You should have to update base url in your database. Open your phpmyadmin, go to core_config_data and update your new url. Use below mysql query,
UPDATE core_config_data SET value="http://localhost/your-magento-location" WHERE path='web/unsecure/host';
Don't forget to clear cache.
Note: Please consider that, before ask question here, you should have search in google. If you are not able to find answer, then you can ask
here.

Jomsocial transfer from one server to another

I am trying to transfer my website with jomsocial from one server to another.
www.iremember.gr
Previous server steps:
Backup all the files from public_html folder.
Backup the DB from php my admin.
New server steps:
Install joomla, entered the prefix in DB of the previous DB prefix.
Deleted all files from public html and extract the backup from the previous server.
Export the DB from the previous server, to the new one.
Changed the configuration.php file with the new user/dbname/password.
Now when i try to enter the new server at this IP address
93.174.121.23/~niremco/
and i login ok.
It loads the main page
but when i try to enter a profile i get a 404 Error.
Although when i try to see the profile
http://93.174.121.23/~niremco/index.php?option=com_community&view=profile&userid=109
i can see it.
But not from the correct link that i had in the previous server
http://93.174.121.23/~niremco/team-iremember/profile
Any idea why this happens?
You probably haven't copied the .htaccess file from the old website, you will need to copy it from the old Joomla website to the new one. This typically happens because the .htaccess file is considered to be a hidden file and as such does not get copied over automatically.
First of all, installing a clean Joomla first is totally unnecessary. As for why you are getting the 404 error pages, this is because you probably have URL rewrite enabled in global configuration, while there is not a proper .htaccess file sitting in your new server.
With proper I mean either no .htaccess at all, or one that was setup for your old hosting. I rather tend to think the second.
To test that your moved correctly your site, disable url rewrite from global configuration.
If you would want to test with url rewrites enabled, then I would suggest to edit the hosts file in your computer and point your domain to the ip address of the new server.
Google Search: How to edit my hosts file - choose the resource for your OS.

*some* magento links pointing to old domain

I have just moved a magento site from one domain to the new one. Steps so far...
Backup the database and restore the database on the new domain. Change the core_config_base table for secure and unsecure base urls
Upload source files
Update the local.xml with new database information
Cleared cache
Now I can go to the site and everything is showing up fine on the new domain. The main navigation is working as it should. When I click on a product, however, it goes to the old domain. Does anyone know why this might be happening?
Can you verify the links when you hover products are correct or in correct consistently? Is old base URL in all links I mean. Also check htaccess file for any directives containing the old domain. Also check to make sure no custom URL rewrites exist in the Magento admin Catalog → URL Rewrite Management .Once you verify htaccess or custom URL rewrites in Magento admin are not causing it, I can suggest other procedures to fix.
Probably your previous developer didn't follow all Magento standards while coding.
My suggestion is download your code and search for strings that equates to your previous domain.Also check in data base, as use of CMS blocks too might result in previous domain links.
Btw make sure you delete all caches
Rm -rf var/cache/*
Verify base URL and secure URL are correct in all scopes via drop down in Magento system configuration.

Move magento from one url to another on the same server

I have developed a site in the url www.example.com/demo on now i want to move the site to www.example.com on the same server what are the steps that are to be taken to move the site on the same server with the same database.
Just copy all the files from demo folder to root folder. Since Database configuration in file will be same, so you don't need to change those.
In database Run this query
SELECT * FROM core_config_data WHERE path = 'web/unsecure/base_url' OR path = 'web/secure/base_url';
change base secure and unsecure url to www.example.com.
Clear the cache and your are ready with www.example.com
I do a similar thing to you. I have a subsite set up for testing before I push to production. I simply copy the files (using git) and the database whenever I want to update production. However, these are two distinct sites with their own directory structure and database.
So, in order to keep things "simple" (ie I don't need to redo things every time), I have untracked versions of app/etc/local.xml so each site connects to the right database and on the production system I have a module to set my secure and unsecure urls (see here for more detail than you probably want: Unable to set base url from config file).
Good luck

Magento front end links not working

I am trying to create a test environment for a Magento site. I downloaded all the files and the database and restored to XAMPP. I changed the two base urls in the core_config_data table to http://magento.local/magento/ and modified the Magento config file to connect to the local database. I also added magento.local in the hosts file. I'm using magento.local as I read Magento must have a . in the domain name. The site almost works except on the front end when on http://magento.local/magento/ and try and go to a different page it tries to access http://magento.local/pagename/ and gives a 404 error, i can access through http://magento.local/magento/index.php/pagename. I have also disabled Web Server Rewrites in the backend as I read that is supposed to fix this problem. Any suggestions much appreciated.
Thanks
Alex

Resources