| :: |
| Author |
Message |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14403
|
|
| Back to top |
|
 |
|
 |
AmirAbbas phpBB SEO Team


Joined: 11 May 2006 Posts: 529 Location: IRAN
|
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  |
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  |
_________________ چهار گوش - طراحی وب - مجله طراحی وب |
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14403
|
|
| Back to top |
|
 |
AmirAbbas phpBB SEO Team


Joined: 11 May 2006 Posts: 529 Location: IRAN
|
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 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14403
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14403
|
|
| Back to top |
|
 |
nims phpBB SEO Team

Joined: 11 Oct 2006 Posts: 243 Location: New Delhi, India
|
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.  |
_________________ Audio Ads - Earn from every visitor to your site
Buy Latest mobiles *** SEO India |
|
| Back to top |
|
 |
Peter77 phpBB SEO Team


Joined: 10 May 2006 Posts: 512 Location: Michigan
|
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
++ |
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

Joined: 28 Apr 2006 Posts: 14403
|
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
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 |
|
 |
nims phpBB SEO Team

Joined: 11 Oct 2006 Posts: 243 Location: New Delhi, India
|
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 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14403
|
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 |
|
 |
nims phpBB SEO Team

Joined: 11 Oct 2006 Posts: 243 Location: New Delhi, India
|
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  |
_________________ Audio Ads - Earn from every visitor to your site
Buy Latest mobiles *** SEO India |
|
| Back to top |
|
 |
AmirAbbas phpBB SEO Team


Joined: 11 May 2006 Posts: 529 Location: IRAN
|
Posted: Wed Nov 22, 2006 7:27 am Post subject: Re: how can i remove index.php from first page URL ? |
|
|
oops
i forgot that i have this topic
thanks dcz this one solved the problem |
_________________ چهار گوش - طراحی وب - مجله طراحی وب |
|
| Back to top |
|
 |
lavinya PR1


Joined: 24 Jul 2006 Posts: 159 Location: Turkey
|
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 |
|
 |
dcz Administrateur - Site Admin

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