Magento url rewrites to local ip - magento

I've installed Magento CE in my xampp enviroment. Everything works fine except that I'm having problem with vhost and access to the site over the internet. When I type the domain name it resolves from e.g. mydomain.com to 127.0.0.1/magento in my url field. What am I doing wrong?

That means you didn't update your database with your current domain name. In magento we have a core_config_data table , so there you need to update your current url

Related

How to correct the url in magento of website and admin panel?

I am doing a project in Magento. I have uploaded my work onto a live server. I have updated the core_config_data table with the server urls in the secure and unsecure urls. But when I typing the live server link, its going to the local server url and also when I am accessing the live servers admin panel its going to the local server url. Can anyone tell why it is like that ?
After changing website from local to live you need to do following changes:
change url's from core_config_data table
change database details from local.xml
and most important, Redirect problem was due to Magento cache.
Simply delete everything from the /var folder.
After performing the above changes, clear your browser's cache & cookies and check again.
On your computer, check your hosts file and see if you have an entry for your domain.
On windows: C:/Windows/System32/drivers/etc/hosts
On mac or ubuntu: /etc/hosts
If you see an entry that shows:
127.0.0.1 www.mydomain.com or
localhost www.mydomain.com
then you should remove your entry.
You should also flush the dns cache.
Whenever I work locally, I use the subdomain 'local' like local.mydomain.com and this way I dont have to worry about these issues.
Also, you should fully delete the var folder, it is safe to do so.

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

Move Magento to WAMP

I am trying to clone a Magento site to wamp and after accessing the local site from Wamp server (localhost) it redirects me to the online version of the site.
I modified web/unsecure/base_url and web/secure/base_url from core_config_data table to "localhost/my_local_site", where the local version of the site is saved.
After I add 127.0.0.1 www.my_site.com to hosts file and turn offline, the local site is loading the first page (index) but the other pages are not loading.
Do you have any ideas what I should do to make the local version of the site work?
Check the database name and user in etc/local.xml
Change the links in your db at core_config_data to localhost or
whatever name your localhost has.
Delete cache and sessions from the localhost folders.
Hopes it helps

Magento Front-end "404 Not Found 1"

Situation:
We have a domain name pointing to our old windows server. We purchased a linux server. I wish to build our new webstore on the Linux server. Once I am ready, I will redirect our domain name to the Linux server.
Up to now:
We have Magento installed on the back end. Now I need to have the front-end working
Problem:
I edited the url to be our domain name. I have edited my host file to have the domain name ignore the windows server ip and get directed to the linux server (the one with Magento installed). The page shows up with links and text in a big mess, and the title of the web page says "404 Not Found 1". I get this problem with both the back-end & the front-end.
Thinking:
I am able to access the PHPadmin and edit the url. I tried making the url the Linux server's IP. If I do that, Magento's back-end works but then I get a completely blank page for the front-end. Any suggestion is welcomed.
To make your site visible:
1) Change the links web/unsecure/base_url and web/secure/base_url of the table core_config_data to http://www.yourdomain.com/ or whatever you have.
2) Go to app->etc->local.xml and change your database username,password, host to the right one.
3) if it is still not working go to var and media folders and change the permissions to 777 for all folders and subfolders.If it works you know it is permission problem.
Read this after that and make your decision magento permissions

How to migrate a Magento Installation to localhost

I've been following several guides over the internet, but I still can't access my Magento (1.6) website from localhost ..
I dumped the DB and imported it to phpMyAdmin, copied the files from the server to my localhost (WAMP), updated local.xml and have been to the core_config_data table and changed web/unsecure/base_url to new URL & web/secure/base_url to new URL.
Is there anything else to do ?
I've seen that sometimes, in some guides, they're asking to go to C:\windows\system32\drivers\etc\hosts and insert the following lines: 127.0.0.1 www.mydomain.com mydomain.com
But I already did this to www.localhost.com since I already have several websites I need to run from localhost, I don't want to change that ..
So when I launch the website from www.localhost.com/mywebsite I'm redirected to the old address and my browser says "Oops! Google Chrome could not find 'the old address' "
Any suggestion would be welcome :)
As long as core_config_data.path values are updated correctly (double-check), the only other thing (besides Magento's PHP code) that could do a redirect is an .htaccess file with a RewriteCond and RewriteRule directive. This also could be present in the VirtualHost.
As another option, you could edit the Windows Hosts file, and resolve your old domain name to 127.0.0.1 and update your VirtualHost's ServerAlias line to include that domain name.
Maybe check that web/cookie/cookie_path and web/cookie/cookie_domain are correctly set into the core_config_data table. I usually delete values of these 2 fields when switching from a server to another.
Also always think of disabling cache before dumping your DB as this can avoid some struggling too.

Resources