Enable multiple pages on front page
Sobiech 77
From: -
From: -
I had enabled "Enable multiple pages on front page" and Google indexed entries "files/page/2.html" 3.html etc. Now I disabled the option "Enable multiple pages on front page", but when I go to (for example) http://www.mypage.com/files/page/2.html it displays http://www.mypage.com/files/index.html but in the address bar is still http://www.mypage.com/files/page/2.html. I think it would be better returning 404 error and then google delete pages like "files/page/2.html", "files/page/3.html", etc.
Notice
This topic is archived. New comments cannot be posted and votes cannot be cast.Responses to this topic
1 Re: Enable multiple pages on front page
Sobiech
OP
77
From: -
From: -
Thanks!
1 Re: Enable multiple pages on front page
Philipp
From: Vienna, Austria
Administrator
1340From: Vienna, Austria
Open modules/files/functions_files.php and replace:
with:
This will redirect all pages traffic to the home page
if( ( $action == "page" ) && ( $page ) )
{
include( "files.php" );
Files( $page );
}
}
with:
if( ( $action == "page" ) && ( $page ) )
{
if( $preferences[ 'files_pages_frontpage' ] )
{
include( "files.php" );
Files( $page );
}
else
{
header( "HTTP/1.1 301 Moved Permanently" );
header( "location: " . $preferences[ 'website_url' ] );
exit;
}
}
This will redirect all pages traffic to the home page