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 Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB Forum
::  
Author Message
Peter77
phpBB SEO Team
phpBB SEO Team


Joined: 10 May 2006
Posts: 512
Location: Michigan

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

dcz wrote:


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

++


This is a great idea! but at the moment I am getting an 404 if I type in my forums URL with index.php. and yes I did change example/phpBB with my own URL.
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14279

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

What about the zero duplicate version of this mod (the first one) ?

Don't you have it running ?

_________________
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: Thu Nov 02, 2006 12:13 pm    Post subject: Re: how can i remove index.php from first page URL ?

amir abbas wrote:
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 ?


Question

_________________
چهار گوش - طراحی وب - مجله طراحی وب
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14279

how can i remove index.php from first page URL ?Posted: Thu Nov 02, 2006 8:55 pm    Post subject: Re: how can i remove index.php from first page URL ?

Sorry, I missed it.

So yes, you're wise Very Happy

And the #xxx is the htlm anchor linked to the post by its id.

An example of html anchor usage : http://www.phpbb-seo.com/boards/phpbb-seo-toolkit/phpbb-seo-mod-rewrites-vt66.html#differences

They are not duplicate, it's just a short cut to a part of the same page, understood well by bots.

And its handy for last post being at the bottom of the page, try some last post links 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: Fri Nov 03, 2006 3:34 am    Post subject: Re: how can i remove index.php from first page URL ?

thanks Razz

_________________
چهار گوش - طراحی وب - مجله طراحی وب
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: Fri Nov 03, 2006 5:18 am    Post subject: Re: how can i remove index.php from first page URL ?

dcz wrote:
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

++


i tried this one for aerospacetalk.com/forum/
but i don't know why the index page referred to main domain
when you click on forum index link you will go to aerospacetalk.com/ instead of aerospacetalk.com/forum/ Shocked

note: a have installed zero dupe on that forum

_________________
چهار گوش - طراحی وب - مجله طراحی وب
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14279

how can i remove index.php from first page URL ?Posted: Fri Nov 03, 2006 10:59 am    Post subject: Re: how can i remove index.php from first page URL ?

It must be PHPBB_URL to be wrong in common.php.

PHPBB_URL should be defined as the full phpBB URL eg www.example.com/phpBB/.

++

_________________
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: Fri Nov 03, 2006 1:11 pm    Post subject: Re: how can i remove index.php from first page URL ?

dcz wrote:
It must be PHPBB_URL to be wrong in common.php.

PHPBB_URL should be defined as the full phpBB URL eg www.example.com/phpBB/.

++


im sure that part is correct Exclamation

_________________
چهار گوش - طراحی وب - مجله طراحی وب
Back to top
Visit poster's website
Peter77
phpBB SEO Team
phpBB SEO Team


Joined: 10 May 2006
Posts: 512
Location: Michigan

how can i remove index.php from first page URL ?Posted: Sat Nov 04, 2006 6:27 am    Post subject: Re: how can i remove index.php from first page URL ?

dcz wrote:
What about the zero duplicate version of this mod (the first one) ?

Don't you have it running ?


Yup, I have the zero duplicate installed. also I noticed that the forum's login.php page submitted an 404 when logging out. I suppose I can start a new thread on this if you are up for the Juarol challange. Laughing

_________________
Juarol.com
| Frekuenciadigital.com |
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14279

how can i remove index.php from first page URL ?Posted: Sat Nov 04, 2006 8:49 am    Post subject: Re: how can i remove index.php from first page URL ?

You could both try to hard code PHPBB_URL in the seo_redirect(PHPBB_URL); call :

Code:
seo_redirect("http://www.example.com/phpBB/");


Just in case 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
Peter77
phpBB SEO Team
phpBB SEO Team


Joined: 10 May 2006
Posts: 512
Location: Michigan

how can i remove index.php from first page URL ?Posted: Sat Nov 04, 2006 10:44 am    Post subject: Re: how can i remove index.php from first page URL ?

Oops, just to be more clear. I meant this part:

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


Returns a 404 If I try entering though mysite.com/phpbb/index.php but not mysite.com/phpbb/

the original one does work. But I am intrested in that 301 redirect. Smile
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14279

how can i remove index.php from first page URL ?Posted: Sat Nov 04, 2006 7:19 pm    Post subject: Re: how can i remove index.php from first page URL ?

I start being confused a bit here http://www.juarol.com/sucasa/index.php isn't it working ?

Or are you talking about another web site ?

++

_________________
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
Peter77
phpBB SEO Team
phpBB SEO Team


Joined: 10 May 2006
Posts: 512
Location: Michigan

how can i remove index.php from first page URL ?Posted: Sat Nov 04, 2006 9:27 pm    Post subject: Re: how can i remove index.php from first page URL ?

Ok, sorry. I switched back to the original code becaue of the 404. but I have added 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.juarol.com/sucasa/");
      exit();
}
// www.phpBB-SEO.com SEO TOOLKIT END



to my index.php so you can see..

It seems to give an 404 and also when logging out from the forum.

:edit:

Ok, Fire Fox let's me see something that IE does not. it is not an 404, it is actually a 500

Moved Permanently
The document has moved here. ( links back to sucasa/index.php )

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

And the login.php is fine. its when logging out of the forum one gets redirected back to the forums/index.php.

_________________
Juarol.com
| Frekuenciadigital.com |
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14279

how can i remove index.php from first page URL ?Posted: Sun Nov 05, 2006 11:52 am    Post subject: Re: how can i remove index.php from first page URL ?

Oh, I see, so it's normal, you only need one redirection, the second version was meant for people without the zero duplicate yet 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
Peter77
phpBB SEO Team
phpBB SEO Team


Joined: 10 May 2006
Posts: 512
Location: Michigan

how can i remove index.php from first page URL ?Posted: Sun Nov 05, 2006 12:19 pm    Post subject: Re: how can i remove index.php from first page URL ?

Embarassed oops, okay.


Could this method be applied to mxbb's index.php also?

_________________
Juarol.com
| Frekuenciadigital.com |
Back to top
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB Forum
Page 2 of 4 Goto page Previous  1, 2, 3, 4  Next

Navigation Similar Topics

Jump to: