| :: |
| Author |
Message |
Stokerpiller PR1

Joined: 24 May 2007 Posts: 101
|
Posted: Wed May 21, 2008 8:05 am Post subject: Need help redirecting |
|
|
Hello
How do I redirect kategorie, forums and posts from one domain to another?
They have all different names
When I use this:
| Code: | | redirect 301 /bbcodes/phpbb3-bbcodes-demo.html http://www.phpbb3bbcodes.com/phpbb3-bbcode-database.html |
I am redirected to this:
| Code: | | http://www.phpbb3bbcodes.com/phpbb3-bbcode-database.html?forum_uri=phpbb3-bbcodes-demo&start= |
It is a kategorie redirect. |
_________________ Kind Regards
Stokerpiller |
|
| Back to top |
|
 |
|
 |
Stokerpiller PR1

Joined: 24 May 2007 Posts: 101
|
Posted: Wed May 21, 2008 11:23 am Post subject: Re: Need help redirecting |
|
|
This actually cant be done right?
I have to redirect every kategori, forum and post like this: | Code: | | redirect 301 /bbcodes/phpbb3-bbcodes-demo.html http://www.phpbb3bbcodes.com |
?? |
_________________ Kind Regards
Stokerpiller |
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15242
|
Posted: Sat May 31, 2008 9:50 am Post subject: Re: Need help redirecting |
|
|
I'm not sure to get it right here.
If you only want to redirect one domain to a new one, with the same content, you can redirect all pages at once pretty easily.
The simplest (and cheapest) solution is to have domainA and domainB set up on the same physical directory (dns setting) and to implement the www prefix redirection (method N°2) for domainB. This way, domainA would lead to where domainB is installed, and the www redirection would rediretc domainA.tld/page.html to domainB.tld/page.html directly.
The alternative is to keep domainA installed on some cheap webspace, and to redirect all request to domainB from there. |
_________________ Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________
Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche |
|
| Back to top |
|
 |
Stokerpiller PR1

Joined: 24 May 2007 Posts: 101
|
Posted: Mon Jun 02, 2008 7:51 pm Post subject: Re: Need help redirecting |
|
|
It is a bit tricky
I wanted to redirect like this:
From -http://www.domaina.com/code/youtube-highslide-t107.html
to -http://www.domainb.com/youtube-t66.html |
_________________ Kind Regards
Stokerpiller |
|
| Back to top |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3987
|
Posted: Mon Jun 02, 2008 10:18 pm Post subject: Re: Need help redirecting |
|
|
If this, as it seems dealing with phpBB3, it could be very simple with the zero dupe, you would just need to add a slash in the RegEx for topic urls. Since it will as well take care about checking the domain, you could set up both domain on the same webspace, adapt the rewriterules a bit and let it do it's job.
The change to implement are few, but they depend on your specific .htaccess, post it here and I'll tell you what to do  |
_________________ phpBB SEO || SEO Forum || Forum Référencement
GYM Sitemap & RSS for phpBB3 has been released ! || GYM Sitemap & RSS for phpBB3 est disponible ! |
|
| Back to top |
|
 |
Stokerpiller PR1

Joined: 24 May 2007 Posts: 101
|
Posted: Tue Jun 03, 2008 4:47 am Post subject: Re: Need help redirecting |
|
|
The thing is that I decided to redirect the entire folder to the new domain.
But thanks anyway  |
_________________ Kind Regards
Stokerpiller |
|
| Back to top |
|
 |
Stokerpiller PR1

Joined: 24 May 2007 Posts: 101
|
Posted: Sat Sep 06, 2008 11:52 pm Post subject: Re: Need help redirecting |
|
|
One more redirect question
I am about to close a domain completely.
Will I gain anything by redirecting the old domain to a new domain?
I have done it like this: | Code: | | RewriteRule (.*) http://www.newdomain.com/ [R=301,L] |
This way all links from the old domain is redirected to the root of the new domain. |
_________________ Kind Regards
Stokerpiller |
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15242
|
Posted: Sat Sep 13, 2008 8:26 am Post subject: Re: Need help redirecting |
|
|
| Stokerpiller wrote: | I wanted to redirect like this:
From -http://www.domaina.com/code/youtube-highslide-t107.html
to -http://www.domainb.com/youtube-t66.html |
if you keep the same url structure, and if again we are talking about redirecting phpBB3 urls, you could use :
| Code: | | RewriteRule ^code/(.*)$ http://www.domainb.com/$1 [R=301,L] |
This would perform the exact redirect (in two steps though) of your example :
-http://www.domaina.com/code/youtube-highslide-t107.html to -http://www.domainb.com/code/youtube-highslide-t107.html
and then, thanks to the zero duplicate to -http://www.domainb.com/youtube-t66.html
You could do this in one single step if you'd set up domaina on the same web space as domainb, using :
| Code: | | RewriteRule ^code/(.*)$ /$1 [QSA,L] |
Before the www redirection. The zero dupe would in this case do all the job in one step.
All this of course implies that you keep the old domain, if you let it go, nothing will be redirected since it won't work at all any more.
++ |
_________________ Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________
Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche |
|
| Back to top |
|
 |
Stokerpiller PR1

Joined: 24 May 2007 Posts: 101
|
Posted: Sat Sep 13, 2008 10:12 am Post subject: Re: Need help redirecting |
|
|
Yes, but that is not the case this time.
I am trying to transfer some PR to a new site with a new theme and another language
They dont have the same content.
This is what I did: | Code: | | RewriteRule (.*) http://www.newsite.com/ [R=301,L] |
This does redirect all old pages to the root of the new one.
But do I gain any PR on the new site?
What I really wanted to do was to redirect pages like this:
-www.danishdomain.dk/bimbo.html
to
-www.internationaldomain.com/rambo.html |
_________________ Kind Regards
Stokerpiller |
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15242
|
Posted: Sun Sep 14, 2008 7:20 am Post subject: Re: Need help redirecting |
|
|
Well, if there is no relation at all in content between the two site, as a matter of fact, you'll have to redirect everything to root.
redirecting -www.danishdomain.dk/bimbo.html
to
-www.internationaldomain.com/rambo.html can only be performed on a per case basis.
Since you cannot really implement one rewriterule per custom redirect if you have a lot, you could do it with php.
If bimbo.html is a physical file, you could use :
| Code: | RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z0-9_-]+)\.html redirect.php?file=$1 [L,NC] |
And then, in redirect.php, perform the redirect when there is one set, for exemple in an array :
| Code: | | $redir_def = array('bimbo' => 'rambo'); |
with :
| Code: | $file = isset($_GET['file']) ? htmlspecialchars($_GET['file']) : '';
if (isset($redir_def[$file])) {
// redirect HTTP 301 to $redir_def[$file] . '.html' = rambo.html |
and so on.
In case bimbo.html is not a physical file, you'll have to do something similar, but in the script building the page.
++ |
_________________ Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________
Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche |
|
| Back to top |
|
 |
|
|