You are here:  » 404 Error Pages

Support Forum



404 Error Pages

Submitted by Rocket32 on Sat, 2009-05-16 17:18 in

Hello David. I am in the process of changing an existing site into a Price Tapestry site. The site currently is a datafeed site with many pages indexed. I would like to know is there a way to make all the requested pages from the old site point to the new price tapestry home page or similar search results?

Submitted by support on Sun, 2009-05-17 08:02

Hi Roy,

Definitely - several users have done similar things. The ideal situation of course if you can easily extract keywords from the old URLs is to redirect to search.php with those keywords as the query. For example; if your old site had URLs like:

http://www.example.com/info.php?productName=Some+Product

Then you could rewrite as follows (on a Linux server, a different rewrite solution would be required on Windows hosting)

RewriteRule info.php?productName=(.*) search.php?q=$1

If you're not sure what to use, post a couple of examples of your current URLs and I'll work out the rules for you...

Cheers,
David.

Submitted by Rocket32 on Sat, 2009-05-23 20:58

All right David, this is an example of my old product link from the same domain that I replaced with a Pricetapestry Site. http://www.petsupplyonlinestore.com/productdetails.php?sku=453701408. The new format with sku in url would be http://petsupplyonlinestore.com/product/453701408.html. Anywhere in the code where I can take advantage of 404 pages.

Submitted by support on Mon, 2009-05-25 10:29

Hi,

Sure - that should be easy to rewrite! Try adding this to your .htaccess, immediately after the RewriteBase line...

RewriteRule ^productdetails.php?sku=(.*) product/$1.html [L,R=301]

This will redirect to the new page with HTTP status code 301 (Moved Permanently), which will mean search engines should update their index to the new page

Cheers,
David.

Submitted by Rocket32 on Mon, 2009-05-25 18:19

I tried this rewrite rule and it currently is not working correctly? All config rewrite settings are set to true.

RewriteRule ^productdetails.php?sku=(.*) product/$1.html [L,R=301]

Submitted by support on Tue, 2009-05-26 08:14

Hi,

What actually happens now when you visit one of the old URLs with this rule in place?

Cheers,
David.

Submitted by Rocket32 on Wed, 2009-05-27 00:38

It gives me a http// 404 file not found error by using the exact link posted above and the new link posted above. It says oops this link appears to be broken.

Submitted by support on Wed, 2009-05-27 08:12

Hi,

I just checked on your site and it doesn't look like it's even trying to execute the rule. Could you perhaps email me your .htaccess and i'll take a look...

Cheers,
David.

Submitted by Rocket32 on Sat, 2009-06-06 02:08

Hello David,

Thanks for the help with the productdetails.php. I have to ask your assistance on 1 more question for another site that I'll change with a little different productdetails.php page. The productdetails page is www.website.com/productdetails.php?table=MerchantName&sku=264508. I need to get this .htaccess for redirecting pages 404/301 to new productdetails.php using sku again along with the Merchant Name.

Thank you,
Roy

Submitted by support on Sat, 2009-06-06 09:07

Hello Roy,

Do you mean redirecting to a /product/sku.html URL or something similar? Perhaps if you could email me some before / after examples and your existing .htaccess i'll give it a go for you...

Cheers,
David.