Magento sub-domain redirecting to main domain even in separate server and DB - magento

I have live magento site yyy.com configured using nginx in linux AWS AMI its using AWS RDS for database.
For the development purpose i have created the development server from the current live server image and for the development purpose
i have created a sub-domain dev.yyy.com and for the development also i created a new RDS server and the dumped the live server databases content.
I have changed both the secure to insecure URL from yyy.com to dev.yyy.com in the core-config-data and upadted the dev database details in the local.xml
config file also and clear the cache and session folder.
The issue is if I load the dev.yyy.com means its taking me to yyy.com.
I put new index.php containing "Hi this test"vinstead of magento index.php in the dev.yyy.com root directory means i can see Hi this test in the browser when i load dev.yyy.com.
Is there any configuration in nginx like return or redirect to resolve this issue.
and if anyone tell me this nginx related problem or magento files related problem. It will be very helpful for me to check further.
I working on this 2 days.

I would check all the values in core_config_data to see if yyy.com is still in there. You may have missed a config or there could be a customization redirecting you.
Also check your .htaccess for any redirect rules that shouldn't be there.
Also make sure you've cleared the contents of var/cache/ and var/full_page_cache/.

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.

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.

How to duplicate magento test server

How do I duplicate my production site to a preprod domain?
I have a live site # www.theprinterdepo.com
I have a sub domain preprod.theprinterdepot.net
I copied the folders over to the folder for the preproduction site, but its an exact copy of the original, so it always redirects to www.theprinterdepo.com. Anybody have experience with this?
Thanks.
You need to also duplicate the database, and update your app/etc/local.xml with the duplicated database details so that your pre-production site is referencing it.
Then you need to specify the new BASE URL in the Magento configuration, or else it will redirect to the production site.
preprod.theprinterdepot.net
If the (preprod.theprinterdepot.net) domain is not publically accessible, then specify it in your local hosts file for example:
192.168.2.1 preprod.theprinterdepot.net
You can find an overview of the complete move details # Magento wiki

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

Magento Use Web Server Rewrites in Multi Domain Setup

I have to two stores each having different domain. They are hosted on dedicated server with SuExec disabled. I have copied the .htaccess and index.php and everything works fine.
The problem I am having is with my 2nd store Web Server Rewrites. As soon I enabled this for the 2nd store which is using symbolic link to the root directory, it starts giving page not found error.
domain2.com/index.php/abc.html ----- Works Fine with Use Web Server Rewrites Turned Off
domain2.com/abc.html ----- Does not work with Use Web Server Rewrites Turned ON
The base store works without any problem.
Any help is much appreciated.
Farrukh Khan
-> Flush The Magento Cache
Goto System->Cache Management
Refresh the catalog rewrites
Goto All Cache and change drop down to Refresh.
Click save
On most server, this should take out the index.php in your URL’s.
If you are getting a 404 error, continue reading.
-> Fixed Mode_Rewrite Errors
Please check you webserver configuration.
Do you use Apache? Maybe there is something like "AllowOverride none" in your configuration which disables .htaccess-files (the .htaccess-file in your magento-root-directory defines the rewrite-rules).
The most common cause for this is that you have an incorrect .htaccess file in your ftp.
Goto the magentocommerce.com site and download the magento files again.
Extract the files, and ONLY upload the .htaccess file to your Magento root directory.
This should fix any problems related to enabling the use of web server rewrites in Magento.
I was facing the same problem above, but now i solved already. The main reason for that problem is .htaccess file. By replacing .htaccess file with magento default .htaccess file solve all the problem. Web Server Rewrites Turned on or off, you can do as you like.
After saving the configuration, don't forget to clear cache.

Resources