This website can use cookies to improve the user experience

This website can use cookies to improve the user experience and to provide certain services and functions to users. Cookies contain small amounts of information (such as login information and user preferences) and will be stored on your device.

Enable All Cookies Privacy Policy

Redirect 302 for old links


avatar
Sobiech 77
From: -
I have a question about old links in my domain. When I click, for example www.mydomainname.com/oldlinkhere.html, I am redirected to www.mydomainname.com (Redirect 302), so Google is still indexing this page.

I have changed PHP-Nuke to Contentteller (2.1.14), but old links (from PHP-Nuke) are still in Google. If I could set up error code 404 for old links, then Google will remove the old links.

Can I set the error code 404 for the old links?

Notice

This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic


1 Re: Redirect 302 for old links
avatar
OP 77
From: -
.htaccess from old site:
RewriteEngine on
RewriteBase /
RewriteRule ^news-([^-]+)-([^-]+).html$ /modules.php?name=News&file=article&sid=$1&$2 [L]

$1 is a number of a news
$2 is a title of the news

--------------------------
OK. I solved the problem in a different way.
1 Re: Redirect 302 for old links
avatar
Administrator
1340
From: Vienna, Austria
Actually, I need that one from your old PHP-Nuke website
1 Re: Redirect 302 for old links
avatar
OP 77
From: -
<IfModule mod_rewrite.c>
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# You may need to adjust the RewriteCond line below to exclude additional directories
RewriteCond %{REQUEST_FILENAME} !^(cadmin|jscripts|images|sitemap)/

RewriteRule ^(.+)$ index.php [L,QSA]
</IfModule>

It's default .htaccess from CT.
1 Re: Redirect 302 for old links
avatar
Administrator
1340
From: Vienna, Austria
Can you post your .htaccess with the mod_rewrite rules?
1 Re: Redirect 302 for old links
avatar
Administrator
1340
From: Vienna, Austria
I think the best would be a redirection script. Can you give me an example of your old links?

Notice

This topic is archived. New comments cannot be posted and votes cannot be cast.