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 can i remove index.php from first page URL ?
Goto page 1, 2, 3, 4  Next
 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB Forum
::  
Author Message
AmirAbbas
phpBB SEO Team
phpBB SEO Team


Joined: 11 May 2006
Posts: 529
Location: IRAN

how can i remove index.php from first page URL ?Posted: Sun Oct 29, 2006 3:14 pm    Post subject: how can i remove index.php from first page URL ?

hi

i ask this questiuon in this topic and you said to me to make a new topic for it

how can i remove index.php form first page URL ?

thanks Smile

_________________
طراحی وب ، آموزش سئو ، آموزش CSS ، phpbb فارسی ، phpbb3 فارسی ، دروپال فارسی
طراحی وب ، قالب وبلاگ ، استاندارد وب ، آموزش CSS و HTML ، آموزش php
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13994

how can i remove index.php from first page URL ?Posted: Sun Oct 29, 2006 3:50 pm    Post subject: Re: how can i remove index.php from first page URL ?

So, first you want to change the way links are outputted on your forum :

Open

Code:
includes/page_header.php


Find :

Code:
   'U_INDEX' => append_sid('index.'.$phpEx),


Replace with :

Code:

   // www.phpBB-SEO.com SEO TOOLKIT END
   'U_INDEX' => append_sid('/'),
   // www.phpBB-SEO.com SEO TOOLKIT END



Then, we want to http 301 redirect www.example.com/phpBB/index.php to www.example.com/phpBB/ :

Open :

Code:
Index.php


Find :

Code:
else
{
   $mark_read = '';
}


After add :
Code:
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$uri = $_SERVER['REQUEST_URI'];
If ($mark_read == '' && $viewcat == -1  && strpos($uri, "index.$phpEx")) {
   seo_redirect(PHPBB_URL);
}
// www.phpBB-SEO.com SEO TOOLKIT END


Note that I wrote this one using the function seo_redirect() and the PHPBB_URL constant, both defined in the zero dupe I just PMed you, so you'll need to install it before.

And you won't need to add :
Code:

$uri = $_SERVER['REQUEST_URI'];

Twice in index.php, the first one added here will be enough 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
AmirAbbas
phpBB SEO Team
phpBB SEO Team


Joined: 11 May 2006
Posts: 529
Location: IRAN

how can i remove index.php from first page URL ?Posted: Wed Nov 01, 2006 7:27 am    Post subject: Re: how can i remove index.php from first page URL ?

thanks Wink

i removed index.php forum http://forum.irani.ch
it works like a charm

our forum first page has PR4 without index.php and PR3 with index.php
it seems that pages that ended to trailing slash can obtain more pagerank than pages that ended to index.php or index.html

_________________
طراحی وب ، آموزش سئو ، آموزش CSS ، phpbb فارسی ، phpbb3 فارسی ، دروپال فارسی
طراحی وب ، قالب وبلاگ ، استاندارد وب ، آموزش CSS و HTML ، آموزش php
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13994

how can i remove index.php from first page URL ?Posted: Wed Nov 01, 2006 9:07 am    Post subject: Re: how can i remove index.php from first page URL ?

Good Very Happy

What about the zero dupe, do you like it Wink

It's as well because backlinks do not generally include index.php.
For phpBB index, www.example.com/ we get the external backlinks, and on www.example.com/index.php the internal.

With this you concentrate both internal and external backlinks on the same URL, it can only be better Very Happy

By the way, for those without the Zero duplicate so far, here is what to do :

Add this :
Code:

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$uri = $_SERVER['REQUEST_URI'];
If ($mark_read == '' && $viewcat == -1  && strpos($uri, "index.$phpEx")) {
         header("Status: 301 Moved Permanently", FALSE, 301);
      header("Location: http://www.example.com/phpBB/");
      exit();
}
// www.phpBB-SEO.com SEO TOOLKIT END


Where you replace http://www.example.com/phpBB/ by your forum's index url.

Instead of this :

Code:
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$uri = $_SERVER['REQUEST_URI'];
If ($mark_read == '' && $viewcat == -1  && strpos($uri, "index.$phpEx")) {
   seo_redirect(PHPBB_URL);
}
// www.phpBB-SEO.com SEO TOOLKIT END


In the above code suggestion 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


Last edited by dcz on Mon Nov 06, 2006 6:37 pm; edited 2 times in total
Back to top
Visit poster's website
HB.
PR0
PR0


Joined: 26 Oct 2006
Posts: 62

how can i remove index.php from first page URL ?Posted: Wed Nov 01, 2006 1:37 pm    Post subject: Re: how can i remove index.php from first page URL ?

hey dcz, thanks for all your help thus far Smile You asked that I continue over in this topic. Whenever you get a chance do you think you could help me with changing the index.php for CH boards? Thank you
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13994

how can i remove index.php from first page URL ?Posted: Wed Nov 01, 2006 5:29 pm    Post subject: Re: how can i remove index.php from first page URL ?

So this means you do not find the above code in your index.php file ?

So for Categories hierarchy, you could try adding this :
Code:
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$uri = $_SERVER['REQUEST_URI'];
If (substr($uri, -9, 9) == 'index.php') {
   if ( !empty($db) ) {
      $db->sql_close();
   }
      header("Status: 301 Moved Permanently", FALSE, 301);
      header("Location: http://www.example.com/phpBB/");
      exit();
}
// www.phpBB-SEO.com SEO TOOLKIT END

Right before :

Code:
define('IN_PHPBB', true);


Instead.

_________________
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


Last edited by dcz on Mon Nov 06, 2006 6:38 pm; edited 2 times in total
Back to top
Visit poster's website
HB.
PR0
PR0


Joined: 26 Oct 2006
Posts: 62

how can i remove index.php from first page URL ?Posted: Wed Nov 01, 2006 5:31 pm    Post subject: Re: how can i remove index.php from first page URL ?

no this was not found in the index.php. I'll try what you just posted.

Quote:
Code:
Index.php


Find :

Code:
else
{
$mark_read = '';
}
Back to top
HB.
PR0
PR0


Joined: 26 Oct 2006
Posts: 62

how can i remove index.php from first page URL ?Posted: Wed Nov 01, 2006 5:38 pm    Post subject: Re: how can i remove index.php from first page URL ?

I tried your code, but it redirects back to my flash intro

edit: hold on about this. I forgot I had setup a redirect...let me try to remove it first to see what happens
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13994

how can i remove index.php from first page URL ?Posted: Wed Nov 01, 2006 5:43 pm    Post subject: Re: how can i remove index.php from first page URL ?

So this is because your are using a page different from index.php when accessing the forum folder (www.example.com/phpBB/ vs www.example.com/phpBB/index.php)

You probably have an index.html file to do this. Both cannot work at the same time, if you want to show you forum index without index.php, you'll need to get rid of the flash intro I am afraid.

++

_________________
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
HB.
PR0
PR0


Joined: 26 Oct 2006
Posts: 62

how can i remove index.php from first page URL ?Posted: Wed Nov 01, 2006 5:47 pm    Post subject: Re: how can i remove index.php from first page URL ?

I got rid of the flash intro (this is all on a test site) I also removed the redirect in my cPanel, and now I get a white page when attempting to view the index.

I'm not quite sure what you meant about not having index.php, the path is example.com/phpbb/index.php

I do have smartor's portal installed. I don't know if that makes a difference
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13994

how can i remove index.php from first page URL ?Posted: Wed Nov 01, 2006 6:03 pm    Post subject: Re: how can i remove index.php from first page URL ?

What I mean is to do the same as here, try this link : http://www.phpbb-seo.com/boards/index.php

For the portal, yes, it does matter, but it depend if phpBB is installed in a sub folder or not.

As you can see www.phpbb-seo.com/index.php is as well taken care of, in a different folder.

If both portal and forum where in the same folder, you'd probably prefer to see portal.php loaded instead of index.php in such case.

And the same principle could be applied to portal.php, it's just on letter longer :

Code:
If (substr($uri, -9, 9) == 'index.php')


would be replaced with

Code:
If (substr($uri, -10, 10) == 'portal.php')


Then, sorry, I closed the db before we could even get connected to it lol, so delete :

Code:
   if ( !empty($db) ) {
      $db->sql_close();
   }


In the suggested code.

++

_________________
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
HB.
PR0
PR0


Joined: 26 Oct 2006
Posts: 62

how can i remove index.php from first page URL ?Posted: Wed Nov 01, 2006 6:11 pm    Post subject: Re: how can i remove index.php from first page URL ?

I think I might have confused you a little (or maybe even myself Laughing ) I just wanted to let you know I had a portal. I orginally had for example
www.example.com lead to the flash intro, but I deleted it now ( I meant to delete that long time ago). The flash intro lead to the portal, and from the portal of course you could go to the forum.
The portal.php and the forum's index.php is install on example.com/phpbb/
The portal loads just fine, but when I click the link to the forum from the portal, I get a blank white page. I hope this clears things up a little bit.
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13994

how can i remove index.php from first page URL ?Posted: Wed Nov 01, 2006 6:18 pm    Post subject: Re: how can i remove index.php from first page URL ?

hmm, a bit yes.

What append if you load example.com/phpbb/ ?

If it's a blanck page, this mean you either have a index.html blank page in the folder or that you need to set up the DirectoryIndex in your .htaccess.

to :

Code:
DirectoryIndex portal.php index.php

_________________
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
HB.
PR0
PR0


Joined: 26 Oct 2006
Posts: 62

how can i remove index.php from first page URL ?Posted: Wed Nov 01, 2006 6:58 pm    Post subject: Re: how can i remove index.php from first page URL ?

wow, you are good. I did have a blank index.html file, but I just recently deleted it. I tried inserting that code in the .htaccess, but its still coming up blank. I don't want to waste too much of your time. If it remains showing example.com/phpbb/index.php will that have any negative results far as SEO goes?
Back to top
AmirAbbas
phpBB SEO Team
phpBB SEO Team


Joined: 11 May 2006
Posts: 529
Location: IRAN

how can i remove index.php from first page URL ?Posted: Thu Nov 02, 2006 3:56 am    Post subject: Re: how can i remove index.php from first page URL ?

dcz wrote:
What about the zero dupe, do you like it Wink


yes Surprised
its perfect !!

http://forum.irani.ch/cracker-tracker-professional-vt1695.html

http://forum.irani.ch/viewtopic.php?t=1695

http://forum.irani.ch/post15382.html#15382

Mr. Green

now i removed /post from robots.txt file because all post URL redirect to proper topic URL

is it a wise act ?
after redirectiong post URL to the URL that wrote above. the shape of URL is like this

http://forum.irani.ch/cracker-tracker-professional-vt1695.html#15382

whats that #15382 at the end of URL ?
how can i remove it ?

_________________
طراحی وب ، آموزش سئو ، آموزش CSS ، phpbb فارسی ، phpbb3 فارسی ، دروپال فارسی
طراحی وب ، قالب وبلاگ ، استاندارد وب ، آموزش CSS و HTML ، آموزش php
Back to top
Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB Forum
Page 1 of 4 Goto page 1, 2, 3, 4  Next

Navigation Similar Topics

Jump to: