| :: |
| Author |
Message |
mhmdkhamis PR4

Joined: 26 Nov 2006 Posts: 436 Location: egypt
|
Posted: Sat Jun 02, 2007 12:10 am Post subject: how i rewrite this urls |
|
|
welcome every body
i have links in my site
-http://islam.paramegsoft.com/alboukhari/index.php?saheh=1
to
-http://islam.paramegsoft.com/alboukhari/index.php?saheh=99
i want to rewrite it
like
-http://islam.paramegsoft.com/alboukhari/saheh/1.html
 |
_________________ برامج |برامج مجانية|العاب |
|
| Back to top |
|
 |
|
 |
mhmdkhamis PR4

Joined: 26 Nov 2006 Posts: 436 Location: egypt
|
Posted: Sat Jun 02, 2007 5:58 am Post subject: Re: how i rewrite this urls |
|
|
i have another qustions
whats of this link best for seo
-http://islam.paramegsoft.com/alboukhari/index.php?saheh=5
or
-http://islam.paramegsoft.com/alboukhari/saleh5.php
i am really sure the best
-http://islam.paramegsoft.com/alboukhari/saleh5.html
 |
_________________ برامج |برامج مجانية|العاب |
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14403
|
Posted: Sat Jun 02, 2007 11:59 am Post subject: Re: how i rewrite this urls |
|
|
I'd say the last one, the simpler.
So for the .htacces part, you'd need to use :
| Code: | RewriteRule ^alboukhari/saheh([0-9]+)\.html$ /alboukhari/index.php?saheh=$1 [QSA,L]
|
Would be :
| Code: | RewriteRule ^alboukhari/saheh/([0-9]+)\.html$ /alboukhari/index.php?saheh=$1 [QSA,L]
|
If you'd go for -http://islam.paramegsoft.com/alboukhari/saheh/1.html
But since it's adding a virtual folder, you'd need to take care about relative links in you pages.
Then you off course need to have the links rewritten in the page, but this depends on how is your script built.
I don't think there would be this many place where the link is made by the script, you just need to mod it in order to output the new URLs instead.
HTTP redirecting the old url could be wise as well.
++ |
_________________ 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 |
|
 |
mhmdkhamis PR4

Joined: 26 Nov 2006 Posts: 436 Location: egypt
|
Posted: Sat Jun 02, 2007 8:21 pm Post subject: Re: how i rewrite this urls |
|
|
thank you dcz
i will do it
and will tell you what happened  |
_________________ برامج |برامج مجانية|العاب |
|
| Back to top |
|
 |
mhmdkhamis PR4

Joined: 26 Nov 2006 Posts: 436 Location: egypt
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14403
|
Posted: Sun Jun 03, 2007 10:27 am Post subject: Re: how i rewrite this urls |
|
|
nice
To redirect, it depends, are these pages sharing sessions with phpBB ?
The simpler would be to use the zero dupe functions, which may require to make them available in the page.
The principle could be :
| Code: | // www.phpBB-SEO.com SEO TOOLKIT BEGIN -> Zero dupe
$uri = $phpbb_seo->seo_req_uri();
if (strpos($uri , 'index.php') !== FALSE && $saheh != 0) {
$phpbb_seo->seo_redirect('http://www.example.com/saheh' . $saheh . '.html');
}
// www.phpBB-SEO.com SEO TOOLKIT END -> Zero dupe |
Assuming that $saheh is the var used to store the page id in your script, and that you update example.com to your domain.
If the page does not share sessions with phpBB, you'd need to start the $phpbb_seo class as in common.php in this page.
The redirecting should occur as soon as the page id is known in the script.
++ |
_________________ 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 |
|
 |
mhmdkhamis PR4

Joined: 26 Nov 2006 Posts: 436 Location: egypt
|
Posted: Sun Jun 03, 2007 10:34 am Post subject: Re: how i rewrite this urls |
|
|
| dcz wrote: | nice
To redirect, it depends, are these pages sharing sessions with phpBB ?
The simpler would be to use the zero dupe functions, which may require to make them available in the page.
The principle could be :
| Code: | // www.phpBB-SEO.com SEO TOOLKIT BEGIN -> Zero dupe
$uri = $phpbb_seo->seo_req_uri();
if (strpos($uri , 'index.php') !== FALSE && $saheh != 0) {
$phpbb_seo->seo_redirect('http://www.example.com/saheh' . $saheh . '.html');
}
// www.phpBB-SEO.com SEO TOOLKIT END -> Zero dupe |
Assuming that $saheh is the var used to store the page id in your script, and that you update example.com to your domain.
If the page does not share sessions with phpBB, you'd need to start the $phpbb_seo class as in common.php in this page.
The redirecting should occur as soon as the page id is known in the script.
++ |
i have in this script html files in (saheh)folder & index.php file only |
_________________ برامج |برامج مجانية|العاب |
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14403
|
|
| Back to top |
|
 |
mhmdkhamis PR4

Joined: 26 Nov 2006 Posts: 436 Location: egypt
|
Posted: Sun Jun 03, 2007 11:07 am Post subject: Re: how i rewrite this urls |
|
|
| dcz wrote: | Then include the phpbb_seo_class file and start the $phpbb_seo class, like in common.php before you add this piece of code in your script.
++ |
i will try  |
_________________ برامج |برامج مجانية|العاب |
|
| Back to top |
|
 |
|
|