clarkk
clarkk

Reputation: 27689

error handling and search engines

I have just changed my page structure from

eg

/my_page.php

to

/my_page/

but now all cached pages on search engines gives 404..

how can I handle them? is it possible to redirect all 404 to directly to the domain www.domain.com and in the same tiem send back a 301 redirect to the search engine?

Upvotes: 0

Views: 29

Answers (1)

cEz
cEz

Reputation: 5062

Try the following in htaccess (if available) or the virtual host's config:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*\.php$ /$1/[R=301,L]

Upvotes: 1

Related Questions