| |
|
| :: |
| Auteur |
Message |
Crusy
Inscrit le: 21 Mai 2007 Messages: 7 Localisation: Toulouse
|
Posté le: Lun Mai 21, 2007 12:00 pm Sujet du message: Message curieux après install du Mod Rewrite Avancé... |
|
|
Bonjour,
Je viens d'installer le mod rewrite avancé et tout s'est bien passé sauf que lorsque j'accède à la page d'accueil du forum j'obtiens ce message :
| Citation: | | Veuillez vous assurer que les deux répertoires install/ et contrib/ sont supprimés |
(alors qu'il sont supprimés)
Et impossible d'aller plus loin...
Quelqu'un a une idée ?
Merci  |
|
|
| Revenir en haut de page |
|
 |
|
 |
dcz Administrateur - Site Admin

Inscrit le: 28 Avr 2006 Messages: 14131
|
|
| Revenir en haut de page |
|
 |
Crusy
Inscrit le: 21 Mai 2007 Messages: 7 Localisation: Toulouse
|
Posté le: Ven Mai 25, 2007 6:39 am Sujet du message: Re: Message curieux après install du Mod Rewrite Avancé... |
|
|
Salut
Voilà le contenu de mon fichier common.php :
| Citation: | <?php
/***************************************************************************
* common.php
* -------------------
* begin : Saturday, Feb 23, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: common.php,v 1.74.2.25 2006/05/26 17:46:59 grahamje 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.
*
***************************************************************************/
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
//
error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables
set_magic_quotes_runtime(0); // Disable magic_quotes_runtime
// The following code (unsetting globals)
// Thanks to Matt Kavanagh and Stefan Esser for providing feedback as well as patch files
// PHP5 with register_long_arrays off?
if (@phpversion() >= '5.0.0' && (!@ini_get('register_long_arrays') || @ini_get('register_long_arrays') == '0' || strtolower(@ini_get('register_long_arrays')) == 'off'))
{
$HTTP_POST_VARS = $_POST;
$HTTP_GET_VARS = $_GET;
$HTTP_SERVER_VARS = $_SERVER;
$HTTP_COOKIE_VARS = $_COOKIE;
$HTTP_ENV_VARS = $_ENV;
$HTTP_POST_FILES = $_FILES;
// _SESSION is the only superglobal which is conditionally set
if (isset($_SESSION))
{
$HTTP_SESSION_VARS = $_SESSION;
}
}
// Protect against GLOBALS tricks
if (isset($HTTP_POST_VARS['GLOBALS']) || isset($HTTP_POST_FILES['GLOBALS']) || isset($HTTP_GET_VARS['GLOBALS']) || isset($HTTP_COOKIE_VARS['GLOBALS']))
{
die("Hacking attempt");
}
// Protect against HTTP_SESSION_VARS tricks
if (isset($HTTP_SESSION_VARS) && !is_array($HTTP_SESSION_VARS))
{
die("Hacking attempt");
}
if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on')
{
// PHP4+ path
$not_unset = array('HTTP_GET_VARS', 'HTTP_POST_VARS', 'HTTP_COOKIE_VARS', 'HTTP_SERVER_VARS', 'HTTP_SESSION_VARS', 'HTTP_ENV_VARS', 'HTTP_POST_FILES', 'phpEx', 'phpbb_root_path');
// Not only will array_merge give a warning if a parameter
// is not an array, it will actually fail. So we check if
// HTTP_SESSION_VARS has been initialised.
if (!isset($HTTP_SESSION_VARS) || !is_array($HTTP_SESSION_VARS))
{
$HTTP_SESSION_VARS = array();
}
// Merge all into one extremely huge array; unset
// this later
$input = array_merge($HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $HTTP_SERVER_VARS, $HTTP_SESSION_VARS, $HTTP_ENV_VARS, $HTTP_POST_FILES);
unset($input['input']);
unset($input['not_unset']);
while (list($var,) = @each($input))
{
if (in_array($var, $not_unset))
{
die('Hacking attempt!');
}
unset($$var);
}
unset($input);
}
//
// addslashes to vars if magic_quotes_gpc is off
// this is a security precaution to prevent someone
// trying to break out of a SQL statement.
//
if( !get_magic_quotes_gpc() )
{
if( is_array($HTTP_GET_VARS) )
{
while( list($k, $v) = each($HTTP_GET_VARS) )
{
if( is_array($HTTP_GET_VARS[$k]) )
{
while( list($k2, $v2) = each($HTTP_GET_VARS[$k]) )
{
$HTTP_GET_VARS[$k][$k2] = addslashes($v2);
}
@reset($HTTP_GET_VARS[$k]);
}
else
{
$HTTP_GET_VARS[$k] = addslashes($v);
}
}
@reset($HTTP_GET_VARS);
}
if( is_array($HTTP_POST_VARS) )
{
while( list($k, $v) = each($HTTP_POST_VARS) )
{
if( is_array($HTTP_POST_VARS[$k]) )
{
while( list($k2, $v2) = each($HTTP_POST_VARS[$k]) )
{
$HTTP_POST_VARS[$k][$k2] = addslashes($v2);
}
@reset($HTTP_POST_VARS[$k]);
}
else
{
$HTTP_POST_VARS[$k] = addslashes($v);
}
}
@reset($HTTP_POST_VARS);
}
if( is_array($HTTP_COOKIE_VARS) )
{
while( list($k, $v) = each($HTTP_COOKIE_VARS) )
{
if( is_array($HTTP_COOKIE_VARS[$k]) )
{
while( list($k2, $v2) = each($HTTP_COOKIE_VARS[$k]) )
{
$HTTP_COOKIE_VARS[$k][$k2] = addslashes($v2);
}
@reset($HTTP_COOKIE_VARS[$k]);
}
else
{
$HTTP_COOKIE_VARS[$k] = addslashes($v);
}
}
@reset($HTTP_COOKIE_VARS);
}
}
//
// Define some basic configuration arrays this also prevents
// malicious rewriting of language and otherarray values via
// URI params
//
$board_config = array();
$userdata = array();
$theme = array();
$images = array();
$lang = array();
$nav_links = array();
$dss_seeded = false;
$gen_simple_header = FALSE;
include($phpbb_root_path . 'config.'.$phpEx);
if( !defined("PHPBB_INSTALLED") )
{
header('Location: ' . $phpbb_root_path . 'install/install.' . $phpEx);
exit;
}
include($phpbb_root_path . 'includes/constants.'.$phpEx);
include($phpbb_root_path . 'includes/template.'.$phpEx);
include($phpbb_root_path . 'includes/sessions.'.$phpEx);
include($phpbb_root_path . 'includes/auth.'.$phpEx);
include($phpbb_root_path . 'includes/functions.'.$phpEx);
include($phpbb_root_path . 'includes/db.'.$phpEx);
// We do not need this any longer, unset for safety purposes
unset($dbpasswd);
//
// Obtain and encode users IP
//
// I'm removing HTTP_X_FORWARDED_FOR ... this may well cause other problems such as
// private range IP's appearing instead of the guilty routable IP, tough, don't
// even bother complaining ... go scream and shout at the idiots out there who feel
// "clever" is doing harm rather than good ... karma is a great thing ...
//
$client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : getenv('REMOTE_ADDR') );
$user_ip = encode_ip($client_ip);
//
// Setup forum wide options, if this fails
// then we output a CRITICAL_ERROR since
// basic forum information is not available
//
$sql = "SELECT *
FROM " . CONFIG_TABLE;
if( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql);
}
while ( $row = $db->sql_fetchrow($result) )
{
$board_config[$row['config_name']] = $row['config_value'];
}
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
include($phpbb_root_path . 'phpbb_seo/phpbb_seo_class.'.$phpEx);
$phpbb_seo = new phpbb_seo();
// www.phpBB-SEO.com SEO TOOLKIT ENDif (file_exists('install') || file_exists('contrib'))
{
message_die(GENERAL_MESSAGE, 'Please_remove_install_contrib');
}
//
// Show 'Board is disabled' message if needed.
//
if( $board_config['board_disable'] && !defined("IN_ADMIN") && !defined("IN_LOGIN") )
{
message_die(GENERAL_MESSAGE, 'Board_disable', 'Information');
}
?> |
Merci pour votre aide  |
|
|
| Revenir en haut de page |
|
 |
nelumbo PR1


Inscrit le: 06 Mar 2007 Messages: 186
|
Posté le: Ven Mai 25, 2007 8:14 am Sujet du message: Re: Message curieux après install du Mod Rewrite Avancé... |
|
|
Il te manquerait pas un peu de code ?
| Code: |
#-----[ FIND ]------------------------------------------
#
if (file_exists('install') || file_exists('contrib'))
{
message_die(GENERAL_MESSAGE, 'Please_remove_install_contrib');
}
#
#-----[ BEFORE, ADD ]------------------------------------------
#
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
include($phpbb_root_path . 'phpbb_seo/phpbb_seo_class.'.$phpEx);
$phpbb_seo = new phpbb_seo();
// www.phpBB-SEO.com SEO TOOLKIT END
|
Il te manque
| Code: | | if (file_exists('install') || file_exists('contrib')) |
|
_________________ Rencontre gratuit || Petite annonce gratuite |
|
| Revenir en haut de page |
|
 |
Crusy
Inscrit le: 21 Mai 2007 Messages: 7 Localisation: Toulouse
|
Posté le: Ven Mai 25, 2007 9:52 am Sujet du message: Re: Message curieux après install du Mod Rewrite Avancé... |
|
|
Je vais voir ça...
Merci  |
|
|
| Revenir en haut de page |
|
 |
Crusy
Inscrit le: 21 Mai 2007 Messages: 7 Localisation: Toulouse
|
Posté le: Ven Mai 25, 2007 10:23 am Sujet du message: Re: Message curieux après install du Mod Rewrite Avancé... |
|
|
Re
Ca fonctionne.
J'arrive sur la page d'accueil.
Par contre, impossible d'accéder aux autres pages.
j'obtiens une erreur 404...
Je me suis penché sur les topics qui en parlent, et j'ai essayé les différentes versions du .htaccess mais rien y fait
Je suis certain que le mod rewrite fonctionne sur cet hébergeur puisque je l'ai sur mon site.
Voilà mon .htaccess :
| Citation: | # $Id: .htaccess,v 1.3 2003/06/12 10:53:20 hpdl Exp $
#
# This is used with Apache WebServers
#
# For this to work, you must include the parameter 'Options' to
# the AllowOverride configuration
#
# Example:
#
# <Directory "/usr/local/apache/htdocs">
# AllowOverride Options
# </Directory>
#
# 'All' with also work. (This configuration is in the
# apache/conf/httpd.conf file)
# The following makes adjustments to the SSL protocol for Internet
# Explorer browsers
<IfModule mod_setenvif.c>
<IfDefine SSL>
SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
</IfDefine>
</IfModule>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php?pID=$2&%{QUERY_STRING}
RewriteRule ^(.*)-t-([0-9]+).html$ articles.php?tPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php?articles_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pr-([0-9]+).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pri-([0-9]+).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-i-([0-9]+).html$ information.php?info_id=$2&%{QUERY_STRING}
# Fix certain PHP values
# (commented out by default to prevent errors occuring on certain
# servers)
#<IfModule mod_php4.c>
# php_value session.use_trans_sid 0
# php_value register_globals 1
#</IfModule>
# You could need to un-comment the following line
# Options +FollowSymlinks
#########################################################
# PHPBB SEO REWRITE RULES #
#########################################################
# AUTHOR : DCZ http://www.phpbb-seo.com/
# STARTED : 01/2006
#####################################################
# FORUMS PAGES
########################
# FORUM INDEX (un-comment if used)
# RewriteRule ^forum/index\.html$ /forum/index.php [QSA,L,NC]
# FORUM PROTECTION RULE
# RewriteRule ^forum/[a-z0-9_-]+/([^/]+\.html)$ /forum/index.php [R=301,L,NC]
# CATEGORIES
RewriteRule ^forum/[a-z0-9_-]*-c([0-9]+)\.html$ /forum/index.php?c=$1 [QSA,L,NC]
# PAGINATED FORUM
RewriteRule ^forum/[a-z0-9_-]*-f([0-9]+)-([0-9]+)\.html$ /forum/viewforum.php?f=$1&start=$2 [QSA,L,NC]
# FORUM
RewriteRule ^forum/[a-z0-9_-]*-f([0-9]+)\.html$ /forum/viewforum.php?f=$1 [QSA,L,NC]
# PAGINATED TOPIC
RewriteRule ^forum/[a-z0-9_-]*-t([0-9]+)-([0-9]+)\.html$ /forum/viewtopic.php?t=$1&start=$2 [QSA,L,NC]
# TOPIC
RewriteRule ^forum/[a-z0-9_-]*-t([0-9]+)\.html$ /forum/viewtopic.php?t=$1 [QSA,L,NC]
# POST
RewriteRule ^forum/post([0-9]+)\.html$ /forum/viewtopic.php?p=$1 [QSA,L,NC]
#PROFILES
RewriteRule ^forum/membre([0-9]+)\.html$ /forum/profile.php?mode=viewprofile&u=$1 [QSA,L,NC]
# END PHPBB PAGES
#####################################################
|
Merci pour votre aide  |
|
|
| Revenir en haut de page |
|
 |
nelumbo PR1


Inscrit le: 06 Mar 2007 Messages: 186
|
Posté le: Ven Mai 25, 2007 11:06 am Sujet du message: Re: Message curieux après install du Mod Rewrite Avancé... |
|
|
Essaies d'enlever "/" devant le répertoire de ton forum pour chaque règle de réécriture.
Exemple:
# FORUM PROTECTION RULE
# RewriteRule ^forum/[a-z0-9_-]+/([^/]+\.html)$ /forum/index.php [R=301,L,NC]
Apres:
# FORUM PROTECTION RULE
# RewriteRule ^forum/[a-z0-9_-]+/([^/]+\.html)$ forum/index.php [R=301,L,NC] |
_________________ Rencontre gratuit || Petite annonce gratuite |
|
| Revenir en haut de page |
|
 |
dcz Administrateur - Site Admin

Inscrit le: 28 Avr 2006 Messages: 14131
|
Posté le: Sam Mai 26, 2007 10:29 am Sujet du message: Re: Message curieux après install du Mod Rewrite Avancé... |
|
|
En fait, tu as tout simplement fait un copier collé un peu rapide dans common.php :
| Code: | | // www.phpBB-SEO.com SEO TOOLKIT ENDif (file_exists('install') || file_exists('contrib')) |
Devrait être :
| Code: | // www.phpBB-SEO.com SEO TOOLKIT END
if (file_exists('install') || file_exists('contrib')) |
Si non, le if est dans le commentaire, et du coup pas de if.
Pour ton .htaccess, mets les rewriterules du forum avant les autres, elles sont pas très strictes et risque de créer des confusions, et il se peut également que tu doives jouer avec le coup du slash, comme le dis nelumbo.
++ |
_________________ 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 |
|
| Revenir en haut de page |
|
 |
Crusy
Inscrit le: 21 Mai 2007 Messages: 7 Localisation: Toulouse
|
Posté le: Sam Mai 26, 2007 1:28 pm Sujet du message: Re: Message curieux après install du Mod Rewrite Avancé... |
|
|
Salut
Merci pour vos réponses.
Je vais essayer tout ça et je vous tiens au courant.
Merci encore  |
|
|
| Revenir en haut de page |
|
 |
|
|
| Navigation |
Autres sujets de discussion |
|
|
|
|
|
|
|