| |
| |
|
|
|
|
| |
|
| |
|
| :: |
| Author |
Message |
lavinya PR1


Joined: 24 Jul 2006 Posts: 159 Location: Turkey
|
Posted: 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 |
|
 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15131
|
Posted: 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
++ |
_________________ 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 |
|
 |
lavinya PR1


Joined: 24 Jul 2006 Posts: 159 Location: Turkey
|
Posted: 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 |
|
 |
lavinya PR1


Joined: 24 Jul 2006 Posts: 159 Location: Turkey
|
Posted: Sat Jan 06, 2007 11:16 am Post subject: Re: Redirect please |
|
|
| Dcz below redirect possible or imposible? |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15131
|
|
| Back to top |
|
 |
lavinya PR1


Joined: 24 Jul 2006 Posts: 159 Location: Turkey
|
Posted: Sat Jan 06, 2007 11:28 am Post subject: Re: Redirect please |
|
|
big thanks dcz  |
|
|
| Back to top |
|
 |
|
|
| Navigation |
Similar Topics |
|
|
|
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |