This forum has been moved here:
Helicon Tech Community Forum

ISAPI_Rewrite 3.0 (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 3.0
Subject Topic: Redirect page not found to home page
Author
Message |
janmontano
Newbie


Joined: 12 September 2011
Location: Australia
Posts: 15
Posted: 12 September 2011 at 8:44pm

Hi,

We recreated and restructured a new site from DNN
platform to EPiServer platform.

There are around 2500+ links from the old site which is
not existing anymore in the new site.

So I just want to have a catch all rule for not found
pages and redirect it to the home page instead.

How would I do it?

Cheers,
Jan

__________________
http://www.kokoness.com.au
Back to Top Visit janmontano's Homepage
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 13 September 2011 at 2:23am

Please try to have the following config for this:

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .? http\://www.site.com/? [R=301,L]

__________________
Regards,
Anton
Back to Top
 
janmontano
Newbie


Joined: 12 September 2011
Location: Australia
Posts: 15
Posted: 13 September 2011 at 8:57pm

Thanks for the reply Anton.

I tried a similar thing yesterday but it didn't work as expected. My previous rules were not working anymore and images
are not displayed properly.

I tried your rules and it produced the same results. I already have some non-existing URLs redirected to certain pages.
And I would like to have a catch all at the end.

Please see config below:

# Helicon ISAPI_Rewrite configuration file
# Version 3.1.0.86

RewriteRule ^matraville$ /en/Our-Hospitals/Matraville-vet-hospital/ [NC,R=301,L]
RewriteRule ^matraville/$ /en/Our-Hospitals/Matraville-vet-hospital/ [NC,R=301,L]
RewriteRule ^innerwestvet$ /en/Our-Hospitals/Inner-west-vet-hospital/ [NC,R=301,L]
RewriteRule ^innerwestvet/$ /en/Our-Hospitals/Inner-west-vet-hospital/ [NC,R=301,L]
RewriteRule ^default\.aspx$ http://www.sydneyanimalhospitals.com.au [R=301,L]

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .? http\://www.sydneyanimalhospitals.com.au/? [R=301,L]

__________________
http://www.kokoness.com.au
Back to Top Visit janmontano's Homepage
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 14 September 2011 at 3:30am

Could you please enable logging in httpd.conf as follows:

RewriteLogLevel 9

Then make the test request once again and show rewrite.log records for this request.

__________________
Regards,
Anton
Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version