I have just switched over to my new site (Magento based website) and the website has a gift registry function on it, as well as the old site. But now the old site links has been sent out for people to use it, and i require if someone uses the old url they will get to the new sites url
我刚刚切换到我的新网站(基于Magento的网站),该网站上有一个礼品登记功能,以及旧网站。但是现在旧的网站链接已被发送给人们使用它,我要求如果有人使用旧网址他们将获得新网站网址
So I'm struggling to redirect an url from my old site to the new site
所以我很难将我的旧网站的网址重定向到新网站
Old site URL http://www.mydomain.com/GiftRegistry/tabid/349/ctl/ViewGiftRegistry/mid/1054/GiftRegistryID/76/Default.aspx?SkinSrc=/Portals/2/Skins/BinunsFinal/BinunsFinBrands
旧网址http://www.mydomain.com/GiftRegistry/tabid/349/ctl/ViewGiftRegistry/mid/1054/GiftRegistryID/76/Default.aspx?SkinSrc=/Portals/2/Skins/BinunsFinal/BinunsFinBrands
New site URL http://www.mydomain.com/index.php/webtexgiftregistry/index/registry/id/EQPB91DMRBB1/key/d81fdd5ea5501b03c9d56ca1bfd917a2/
新网站网址http://www.mydomain.com/index.php/webtexgiftregistry/index/registry/id/EQPB91DMRBB1/key/d81fdd5ea5501b03c9d56ca1bfd917a2/
Website is running on a windows server.
网站正在Windows服务器上运行。
1 个解决方案
#1
0
Theres some more information that you might need to provide in order to get a full answer on this. You specify that this is a Magento site running on windows so are you running Apache/PHP/MySQL for windows or a variant there in WAMP for example, or are you using IIS to run the Web server.
您可能需要提供更多信息才能获得完整的答案。您指定这是在Windows上运行的Magento站点,因此您运行Apache / PHP / MySQL for Windows或WAMP中的变体,或者您使用IIS运行Web服务器。
If you are using Apache, you should be able to update the configuration of the server or use a .htaccess to setup some Redirect Rules in order to set up a 301 Redirect from the old URL to the new one.
如果您使用的是Apache,则应该能够更新服务器的配置或使用.htaccess设置一些重定向规则,以便设置从旧URL到新URL的301重定向。
From what I can see of your two sample URLS, you do not appear to have an obvious link between the two (ie no URL paramaters match) as a consequence you may be required to create a rule for each individual url to acheive this goal.
从我所看到的两个示例URLS中,您似乎没有明显的链接(即没有URL参数匹配),因此您可能需要为每个URL创建一个规则来实现此目标。
So for example in .htaccess or VirtualHost (if it is apache) you could enter:
例如,在.htaccess或VirtualHost(如果是apache)中,您可以输入:
Redirect /GiftRegistry/tabid/349/ctl/ViewGiftRegistry/mid/1054/GiftRegistryID/76/Default.aspx?SkinSrc=/Portals/2/Skins/BinunsFinal/BinunsFinBrands http://www.mydomain.com/index.php/webtexgiftregistry/index/registry/id/EQPB91DMRBB1/key/d81fdd5ea5501b03c9d56ca1bfd917a2/
IIS would be fundamentally the same process, but I have no experience on configuration of IIS redirects, the following may help you get that setup however. http://www.iis.net/configreference/system.webserver/httpredirect
IIS基本上是相同的过程,但我没有配置IIS重定向的经验,但以下可能会帮助您获得该设置。 http://www.iis.net/configreference/system.webserver/httpredirect
Apache Reference: http://httpd.apache.org/docs/2.2/mod/mod_alias.html#redirect
Apache参考:http://httpd.apache.org/docs/2.2/mod/mod_alias.html#redirect
#1
0
Theres some more information that you might need to provide in order to get a full answer on this. You specify that this is a Magento site running on windows so are you running Apache/PHP/MySQL for windows or a variant there in WAMP for example, or are you using IIS to run the Web server.
您可能需要提供更多信息才能获得完整的答案。您指定这是在Windows上运行的Magento站点,因此您运行Apache / PHP / MySQL for Windows或WAMP中的变体,或者您使用IIS运行Web服务器。
If you are using Apache, you should be able to update the configuration of the server or use a .htaccess to setup some Redirect Rules in order to set up a 301 Redirect from the old URL to the new one.
如果您使用的是Apache,则应该能够更新服务器的配置或使用.htaccess设置一些重定向规则,以便设置从旧URL到新URL的301重定向。
From what I can see of your two sample URLS, you do not appear to have an obvious link between the two (ie no URL paramaters match) as a consequence you may be required to create a rule for each individual url to acheive this goal.
从我所看到的两个示例URLS中,您似乎没有明显的链接(即没有URL参数匹配),因此您可能需要为每个URL创建一个规则来实现此目标。
So for example in .htaccess or VirtualHost (if it is apache) you could enter:
例如,在.htaccess或VirtualHost(如果是apache)中,您可以输入:
Redirect /GiftRegistry/tabid/349/ctl/ViewGiftRegistry/mid/1054/GiftRegistryID/76/Default.aspx?SkinSrc=/Portals/2/Skins/BinunsFinal/BinunsFinBrands http://www.mydomain.com/index.php/webtexgiftregistry/index/registry/id/EQPB91DMRBB1/key/d81fdd5ea5501b03c9d56ca1bfd917a2/
IIS would be fundamentally the same process, but I have no experience on configuration of IIS redirects, the following may help you get that setup however. http://www.iis.net/configreference/system.webserver/httpredirect
IIS基本上是相同的过程,但我没有配置IIS重定向的经验,但以下可能会帮助您获得该设置。 http://www.iis.net/configreference/system.webserver/httpredirect
Apache Reference: http://httpd.apache.org/docs/2.2/mod/mod_alias.html#redirect
Apache参考:http://httpd.apache.org/docs/2.2/mod/mod_alias.html#redirect