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
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14403

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

Very possible, would be a nice occasion to start a new topic Wink

http://www.phpbb-seo.com/index.php 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: Mon Nov 06, 2006 7:33 am    Post subject: Re: how can i remove index.php from first page URL ?

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


its little strange

when forum is installed in subdomain, there isn't any problem
but when your forum is installed in a folder and its part of main domain
the forum index link guide users to first page of main domain instead of first page of forum Shocked

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


Joined: 28 Apr 2006
Posts: 14403

how can i remove index.php from first page URL ?Posted: Mon Nov 06, 2006 8:44 am    Post subject: Re: how can i remove index.php from first page URL ?

Well, this is rather strange because :

http://www.phpbb-seo.com/boards/index.php and http://www.phpbb-seo.com/forums/index.php

Can you send us the beginning of your index.php file (up to the la seo_redirect call ) so I can check ?

++

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

ok

Code:
<?php
/***************************************************************************
 *                                index.php
 *                            -------------------
 *   begin                : Saturday, Feb 13, 2001
 *   copyright            : (C) 2001 The phpBB Group
 *   email                : support@phpbb.com
 *
 *   $Id: index.php,v 1.99.2.7 2006/01/28 11:13:39 acydburn Exp $
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//

$viewcat = ( !empty($HTTP_GET_VARS[POST_CAT_URL]) ) ? $HTTP_GET_VARS[POST_CAT_URL] : -1;

if( isset($HTTP_GET_VARS['mark']) || isset($HTTP_POST_VARS['mark']) )
{
   $mark_read = ( isset($HTTP_POST_VARS['mark']) ) ? $HTTP_POST_VARS['mark'] : $HTTP_GET_VARS['mark'];
}
else
{
   $mark_read = '';
}
// 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

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


Joined: 28 Apr 2006
Posts: 14403

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

mmh, nothing wrong in here, assuming PHPBB_URL is correct, the only other place where something could happen is in your .htaccess.

Could you post it here ?

You confirm that with the hard coding of the correct URL (seo_redirect("http://www.example.com/phpBB/")Wink it's doing the same ?

++

_________________
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
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14403

how can i remove index.php from first page URL ?Posted: Mon Nov 06, 2006 6:37 pm    Post subject: Re: how can i remove index.php from first page URL ?

Oups, noticed a typo, missing "Status:" in the header lol.

Code:
header("Status: 301 Moved Permanently", FALSE, 301);


So post fixed 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
nims
phpBB SEO Team
phpBB SEO Team


Joined: 11 Oct 2006
Posts: 243
Location: New Delhi, India

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

I guess there is some problem when the forum is in a subdirectory like my forum is in forum directory and when I change page_header file the link to Forum Index points to website's home page. It shud point to forums homepage. Question

_________________
Audio Ads - Earn from every visitor to your site
Buy Latest mobiles *** SEO India
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 18, 2006 7:14 pm    Post subject: Re: how can i remove index.php from first page URL ?

dcz wrote:
Oups, noticed a typo, missing "Status:" in the header lol.

Code:
header("Status: 301 Moved Permanently", FALSE, 301);


So post fixed Wink

++


Hey dcz, which post are you talking about. and are you informing amir abbas or everyone?

Thanks

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


Joined: 28 Apr 2006
Posts: 14403

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

@nims

Strange, the link should be relative as it is at first.

Did you have the same code to search for in the file ?

Anyway, you can fix this easily by just hard coding you phpBB URL in page_header.php.

Find :

Code:
'U_INDEX' => append_sid('/'),


replace with :

Code:
'U_INDEX' => append_sid('http://www.example.com/phpBB/'),


Withe the correct URL of course Wink

Peter77

I was informing everyone, and edited my posts, but this is rather an on /off error, so if it's working, it should not apply to your case.

You can check the changed file to make sure you have the correct syntax if you want to be sure.

++

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


Joined: 11 Oct 2006
Posts: 243
Location: New Delhi, India

how can i remove index.php from first page URL ?Posted: Mon Nov 20, 2006 5:07 am    Post subject: Re: how can i remove index.php from first page URL ?

I think you shud check this issue bcos everyone seems to be facing this problem. Hardcoded option is something I wud say a temporary solution.

_________________
Audio Ads - Earn from every visitor to your site
Buy Latest mobiles *** SEO India
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14403

how can i remove index.php from first page URL ?Posted: Mon Nov 20, 2006 7:24 am    Post subject: Re: how can i remove index.php from first page URL ?

Yes, I know, but as you can see the code change is obvious, so it rather looks like a specific setting issue if it does not lead to the proper page.

I don't see anything wrong on your forum, beside the final touch was taken off it seems.

And actually, providing here, the full URL is better SEO wise than to leave the relative path as is.

You could if not already done, define a constant in common.php :

Code:
define('PHPBB_URL', 'http://www.example.com/phpBB/');


and use it after like this :

Code:
'U_INDEX' => append_sid(PHPBB_URL),


with these code changes.

This constant is handy will be used by many modules here, so it can be a good thing already.

You could as well try to just replace the line to search for in page_header.php with :

Code:
'U_INDEX' => append_sid(),


And see if this is enough to have the relative path working.

++

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


Joined: 11 Oct 2006
Posts: 243
Location: New Delhi, India

how can i remove index.php from first page URL ?Posted: Tue Nov 21, 2006 5:25 am    Post subject: Re: how can i remove index.php from first page URL ?

Final touch given, messed up with some files as hard disk crashed.

OK its working fine now with
Code:
'U_INDEX' => append_sid(PHPBB_URL),

in page_header.php
Thanks Smile

_________________
Audio Ads - Earn from every visitor to your site
Buy Latest mobiles *** SEO India
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 22, 2006 7:27 am    Post subject: Re: how can i remove index.php from first page URL ?

oops Shocked

i forgot that i have this topic

thanks dcz this one solved the problem

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


Joined: 24 Jul 2006
Posts: 159
Location: Turkey

how can i remove index.php from first page URL ?Posted: Sun Jan 07, 2007 7:23 pm    Post subject: Re: how can i remove index.php from first page URL ?

hello all.

I install this mod. http://www.phpbb-seo.com/boards/phpbb-forum/discussions-vt339.html#2621
ok works.

But click ../phpBB2/index.php
Fatal error: Call to undefined function: seo_redirect() in /.../httpdocs/phpBB2/index.php on line 50

how to fix?

thanks.
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14403

how can i remove index.php from first page URL ?Posted: Sun Jan 07, 2007 10:42 pm    Post subject: Re: how can i remove index.php from first page URL ?

well you just need to read the third post Wink

http://www.phpbb-seo.com/boards/phpbb-forum/discussions-vt339.html#2649

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

_________________
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
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB Forum
Page 3 of 4 Goto page Previous  1, 2, 3, 4  Next

Navigation Similar Topics

Jump to: