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  
 
   
how i rewrite this urls

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » Apache mod Rewrite
::  
Author Message
mhmdkhamis
PR4
PR4


Joined: 26 Nov 2006
Posts: 436
Location: egypt

how i rewrite this urlsPosted: 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
Very Happy

_________________
برامج |برامج مجانية|العاب
Back to top
Visit poster's website
mhmdkhamis
PR4
PR4


Joined: 26 Nov 2006
Posts: 436
Location: egypt

how i rewrite this urlsPosted: Sat Jun 02, 2007 5:58 am    Post subject: Re: how i rewrite this urls

i have another qustions Very Happy

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

Laughing Laughing

_________________
برامج |برامج مجانية|العاب
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14403

how i rewrite this urlsPosted: 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
Visit poster's website
mhmdkhamis
PR4
PR4


Joined: 26 Nov 2006
Posts: 436
Location: egypt

how i rewrite this urlsPosted: 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 Wink

_________________
برامج |برامج مجانية|العاب
Back to top
Visit poster's website
mhmdkhamis
PR4
PR4


Joined: 26 Nov 2006
Posts: 436
Location: egypt

how i rewrite this urlsPosted: Sun Jun 03, 2007 7:08 am    Post subject: Re: how i rewrite this urls

Very Happy Very Happy
i do it

http://islam.paramegsoft.com/alboukhari/saheh1.html

now i want please dcz any kind of redirct to my old pages

-http://islam.paramegsoft.com/alboukhari/index.php?saheh=1

_________________
برامج |برامج مجانية|العاب
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14403

how i rewrite this urlsPosted: Sun Jun 03, 2007 10:27 am    Post subject: Re: how i rewrite this urls

nice Very Happy

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
Visit poster's website
mhmdkhamis
PR4
PR4


Joined: 26 Nov 2006
Posts: 436
Location: egypt

how i rewrite this urlsPosted: Sun Jun 03, 2007 10:34 am    Post subject: Re: how i rewrite this urls

dcz wrote:
nice Very Happy

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.

++


Confused Confused Embarassed


i have in this script html files in (saheh)folder & index.php file only

_________________
برامج |برامج مجانية|العاب
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14403

how i rewrite this urlsPosted: Sun Jun 03, 2007 11:00 am    Post subject: Re: how i rewrite this urls

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.

++

_________________
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
mhmdkhamis
PR4
PR4


Joined: 26 Nov 2006
Posts: 436
Location: egypt

how i rewrite this urlsPosted: 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 Wink

_________________
برامج |برامج مجانية|العاب
Back to top
Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » Apache mod Rewrite
Page 1 of 1

Navigation Similar Topics

Jump to: