Magento News
Magento Staging environment 302 redirect problem
I am attempting to create a staging environment for an existing magento site. Here are my steps thus far:
-created new sub-domain/database
-copied files from ~www.mymagentosite.com/html ~staging.mymagentosite.com/html
~inserted DB dump from original site into new database for staging site and edited the core_config_data table accordingly with the new staging site URL
-cleared out all files within var/session and var/cache
-searched and replaced all references to original site path:
find . -type f -print | xargs sed -i -e ’s/OLD_PATH/NEW_PATH/g’
site references:
http://alexander.holbreich.org/2009/01/how-to-duplicate-magento-installation/
Problem: When I pull up the new sub-domain in my browser it automatically redirects to the original site by way of a 302 redirect. This behavior persists minus DB interaction. During troubleshooting I dropped the database and observed the behavior. This tells me that the redirect is taking place within source files. I find this particularly odd being that I have replaced every reference to the previous URL/path within every file. I’m beginning to think I’m dealing with a bug. Has anyone else ever experienced this type of behavior? Can someone please provide me with a lead? Here is the output of the server’s headers using “siege”:
(I have replaced the Host with the examples above)
GET / HTTP/1.1
Host: staging.mymagentosite.com
Accept: */*
Accept-Encoding: *
User-Agent: JoeDog/1.00 [en] (X11; I; Siege 2.66)
Connection: close
(HERE IS WHERE THE REDIRECT TAKES PLACE)
HTTP/1.1 302 Found
Date: Thu, 13 May 2010 08:45:36 GMT
Server: Apache
Location: http://www.mymagentosite.com/
Vary: Accept-Encoding
Content-Length: 0
Connection: close
Content-Type: text/html; charset=UTF-8
GET / HTTP/1.1
Host: www.mymagentosite.com
Accept: */*
Accept-Encoding: *
User-Agent: JoeDog/1.00 [en] (X11; I; Siege 2.66)
Connection: close
HTTP/1.1 200 OK
Date: Thu, 13 May 2010 08:45:36 GMT
Server: Apache
Set-Cookie: frontend=6ced692408d4c0e0f09f873392aae195; expires=Fri, 14 May 2010 08:45:36 GMT; path=/; domain=www.mymagentosite.com; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: OAID=715a4ee137cf5397a215bdbe3bd70ebc; expires=Fri, 13-May-2011 08:45:37 GMT; path=/
P3P: CP=”CUR ADM OUR NOR STA NID”
Set-Cookie: OAID=715a4ee137cf5397a215bdbe3bd70ebc; expires=Fri, 13-May-2011 08:45:37 GMT; path=/
Vary: Accept-Encoding
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8
When I pull up site within my browser the Apache logs read:
[13/May/2010:00:59:09 -0700] “GET / HTTP/1.1” 302 20 “-” “Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3”
Magento Staging environment 302 redirect problem
Possibly Related Posts:
- Patrick berichtet von der Meet Magento! http://t.co/QPd7zcNQ
- RT @avstudnitz: @royrubin05 Will there be a #Magento Developers Paradise this year? I attended both in Ibiza and Mallorca, it was great :-)
- Meet Magento: Die spannendsten Eindrücke aus Leipzig http://t.co/E376BZWH
- i have a new dedicated server with 1and1 that needs setting up for magento, having problem with mcrypt… http://t.co/lCMeHuya #SysAdmin
- Latest blog post by Corey "Introducing ‘Demac Latest Reviews’" #ecommerce #magento #reviews http://t.co/lY6CMwJM
RSS Feed