phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
Redirect please

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB mod Rewrite
::  
Author Message
lavinya
PR1
PR1


Joined: 24 Jul 2006
Posts: 159
Location: Turkey

Redirect pleasePosted: Sat Jan 06, 2007 10:52 am    Post subject: Redirect please

Hello. I using .htaccess this code:

Code:
RewriteRule ^arama-yazar-([a-zA-Z0-9_-]*).html search.php?&search_author=$1 [QSA,L]


But two url
../phpBB2/search.php?search_author=lavinya
and
../phpBB2/arama-yazar-lavinya.html

and my 2. code
Code:
RewriteRule ^uye-([0-9]*).html profile.php?mode=viewprofile&u=$1 [QSA,L]

But two url
../phpBB2/profile.php?mode=viewprofile&u=2
and
../phpBB2/uye-2.html

How to redirect with 301 code:
/phpBB2/search.php?search_author=lavinya to
/phpBB2/arama-yazar-lavinya.html

and

/phpBB2/search.php?search_author=lavinya to
/phpBB2/arama-yazar-lavinya.html

If you reply me messages I will be happy thanks.
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15131

Redirect pleasePosted: Sat Jan 06, 2007 11:06 am    Post subject: Re: Redirect please

Well, there is a small problem with user names.

you must use urlencode prior to inject them, as you want to keep the user name's unicity.

bob the geek => bob%2Fthe%2Fgeek and it's not really the nicest, but it works.

Because, if you replace special chars, like spaces etc the way we do it for topic titles, you'll end up with bob the geek = bob(the geek) = bob-the-geek

So several users could end up with the same URL.

so the correct Rewriterule :

Code:
RewriteRule ^arama-yazar-(.*)\.html search.php?&search_author=$1 [QSA,L]


As you need to pretty much allow all chars (at least %)

Or :

Code:
[code]RewriteRule ^arama-yazar-([a-zA-Z0-9_-\%]*)\.html search.php?&search_author=$1 [QSA,L][/code]


to be more strict.

For the profiles and search links redirections, ho well, it's not the most important.

The one in profile will be added to our zero dupe release, I am not decided yet about user search posts links, but the redirection should be done in search.php, as soon as the script checked the user name.

0.2.0 is really close now Wink

++

_________________
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
Visit poster's website
lavinya
PR1
PR1


Joined: 24 Jul 2006
Posts: 159
Location: Turkey

Redirect pleasePosted: Sat Jan 06, 2007 11:12 am    Post subject: Re: Redirect please

thanks for reply dcz.
Dcz: I using "only english characters and no space mod" on the for username and user register.
Back to top
Visit poster's website
lavinya
PR1
PR1


Joined: 24 Jul 2006
Posts: 159
Location: Turkey

Redirect pleasePosted: Sat Jan 06, 2007 11:16 am    Post subject: Re: Redirect please

Dcz below redirect possible or imposible?
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15131

Redirect pleasePosted: Sat Jan 06, 2007 11:25 am    Post subject: Re: Redirect please

Very possible, we'll take care of this with 0.2.0, I don't want to dev for 0.0.2 being so close to update, to be waited within a week or so Wink

_________________
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
Visit poster's website
lavinya
PR1
PR1


Joined: 24 Jul 2006
Posts: 159
Location: Turkey

Redirect pleasePosted: Sat Jan 06, 2007 11:28 am    Post subject: Re: Redirect please

big thanks dcz Very Happy
Back to top
Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB mod Rewrite
Page 1 of 1

Navigation Similar Topics

Jump to: