PDA

View Full Version : 301 redirect ASPX page !!! Please help!



resdog
19 May 2011, 01:40 PM
OK. There was once a website that was built using aspx. They came to me and wanted me to redesign their site. Not working in aspx, I told them that I would create a site in php for them. They didn't care, as long as it had the same functionality.

Now the site is complete and we've switched the DNS from their old host to us. I went in to do my normal redirects in the .htaccess file, but for some reason when you go to those old aspx pages, the redirects don't work.

I did some research and was told that you have to redirect the aspx pages using the web.config. I've tried that, and it still doesn't work.

OH, actually, I was able to get one page to redirect, but I don't know how as I removed all the rules from htaccess and web.config, and the file still redirected!

I'm at my wits end. Can anyone help me? Here's the web.config file:



<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Migrate to PHP">
<match url="^InventoryList\.aspx" />
<action type="Redirect" redirectType="Permanent" url="http://www.texascarsdirect.com/inventory/" />
</rule>
<rule name="Default Migrate">
<match url="^default\.aspx" />
<action type="Redirect" redirectType="Permanent" url="http://www.texascarsdirect.com/" />
</rule>
<rule name="About us">
<match url="^AboutUs\.aspx" />
<action type="Redirect" redirectType="Permanent" url="http://www.texascarsdirect.com/about-us/" />
</rule>
<rule name="Directions">
<match url="^Directions\.aspx" />
<action type="Redirect" redirectType="Permanent" url="http://www.texascarsdirect.com/directions/" />
</rule>
<rule name="Finance">
<match url="^Finance\.aspx" />
<action type="Redirect" redirectType="Permanent" url="http://www.texascarsdirect.com/financing/" />
</rule>
<rule name="Inventory Detail">
<match url="InventoryDetail\.aspx" />
<action type="Redirect" redirectType="Permanent" url="http://www.texascarsdirect.com/inventory/" />
</rule>
<rule name="Inventory List Print">
<match url="InventoryListPrint\.aspx" />
<action type="Redirect" redirectType="Permanent" url="http://www.texascarsdirect.com/inventory/" />
</rule>
<rule name="Inventory Detail Print">
<match url="InventoryDetailPrint\.aspx" />
<action type="Redirect" redirectType="Permanent" url="http://www.texascarsdirect.com/inventory/" />
</rule>
<rule name="Lease Inventory Detail">
<match url="LeaseInventoryDetail\.aspx" />
<action type="Redirect" redirectType="Permanent" url="http://www.texascarsdirect.com/inventory/" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

The pages are located :
http://texascarsdirect.com/PublicWeb/UI/WebForms2/


and the files names are:
default.aspx
AboutUs.aspx
Directions.aspx
Finance.aspx
InventoryDetail.aspx
InventoryListPrint.aspx
InventoryDetailPrint.aspx
LeaseInventoryDetail.asp

How can I get them to redirect?