Página 1 de 1

phpbb seo. Dudas modificacion .htaccess

Publicado: 30 Mar 2009, 15:25
por dvd_alon
Haber tengo instalado Version : Advanced - 0.4.6, que viene de seri en el proyecto SDKA.

Me he puesto a configurarlo y he puesto estas cosas (fuente Fuente):
Spoiler
Activate URL rewriting: Si
Profiles and groups injection: Si
Virtual folder Profiles: Si
Profiles ID removing: Si
Common Search and User messages pages rewriting: Si
SID Removing: No
Highlights Removing: Si
Remove small words: No
Virtual Folder: Si
Virtual Root: No
Forum URL caching: Si
Forum ID Removing : Si

le damos a enviar

en la parte izquierda dice Forum URL Management

Le das ahí y modificas las url como quieras

Ahora siempre a la izquierda dice algo como .htaccess

En el menú te saldrá algo como :

Save the .htaccess:
If checked, an .htaccess files will be generated upon submit in the phpbb_seo/cache/ folder. It's ready to go with your last settings, bou will still have to move it in the right place.

Le das a
SI

Luego en la otra opción donde dice

More Options:
If the first suggested .htaccess does not work.
First make sure mod_rewrite is activated on your server.
Then, make sure you uploaded it in the right folder, and that another one is not perturbing.
If not enough, hit the "more option" button.

Le das a Si o No, esto depende de ti, si quieres o no mas opciones..

Para finalizar le das a enviar
Hasta aqui bien, ahora:
Spoiler
hí te saldrá el Nuevo .htacces

Lo copias y lo guardas y lo subes en /public_html/ (www)

Sino sabes guardarlo o tienes problemas para visualizarlo, Copia este que tiene las mismas configuraciones
Y mis dudas:
1. El archivo que tengo que modificar es el .htaccess que tengo en root?
2. En el caso que si sea ese archivo, en el mio pone:
Spoiler
<Files "config.php">
Order Allow,Deny
Deny from All
</Files>

<Files "common.php">
Order Allow,Deny
Deny from All
</Files>

RewriteEngine on

Rewriterule ^blog/(.+)/(.+).html$ /blog/view/blog.php?page=$1&mode=$2
Rewriterule ^blog/(.+).html$ /blog/blog.php?page=$1
Rewriterule ^blog/(.+)/$ /blog/view/blog.php?page=$1
Rewriterule ^blog/$ /blog/blog.php
Y en el nuevo pone/ el que me da pone):
Spoiler
# Lines That should already be in your .htacess
<Files "config.php">
Order Allow,Deny
Deny from All
</Files>
<Files "common.php">
Order Allow,Deny
Deny from All
</Files>

# You may need to un-comment the following lines
# Options +FollowSymlinks
# To make sure that rewritten dir or file (/|.html) will not load dir.php in case it exist
# Options -MultiViews
# REMEBER YOU ONLY NEED TO STARD MOD REWRITE ONCE
RewriteEngine On
# REWRITE BASE
RewriteBase /
# HERE IS A GOOD PLACE TO ADD THE WWW PREFIXE REDIRECTION

#####################################################
# PHPBB SEO REWRITE RULES - ADVANCED
#####################################################
# AUTHOR : dcz http://www.phpbb-seo.com" onclick="window.open(this.href);return false;
# STARTED : 01/2006
#################################
# FORUMS PAGES
###############
# FORUM INDEX
RewriteRule ^forum\.html$ /index.php [QSA,L,NC]
# FORUM
RewriteRule ^[a-z0-9_-]*-f([0-9]+)/?(page([0-9]+)\.html)?$ /viewforum.php?f=$1&start=$3 [QSA,L,NC]
# TOPIC WITH VIRTUAL FOLDER
RewriteRule ^[a-z0-9_-]*-f([0-9]+)/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?f=$1&t=$2&start=$4 [QSA,L,NC]
# GLOBAL ANNOUNCES WITH VIRTUAL FOLDER
RewriteRule ^announces/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?t=$1&start=$3 [QSA,L,NC]
# TOPIC WITHOUT FORUM ID & DELIM
RewriteRule ^([a-z0-9_-]*)/?[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?forum_uri=$1&t=$2&start=$4 [QSA,L,NC]
# PROFILES THROUGH USERNAME
RewriteRule ^member/([^/]+)/?$ /memberlist.php?mode=viewprofile&un=$1 [QSA,L,NC]
# USER MESSAGES THROUGH USERNAME
RewriteRule ^member/([^/]+)/(topics|posts)/?(page([0-9]+)\.html)?$ /search.php?author=$1&sr=$2&start=$4 [QSA,L,NC]
# GROUPS ADVANCED
RewriteRule ^[a-z0-9_-]*-g([0-9]+)(-([0-9]+))?\.html$ /memberlist.php?mode=group&g=$1&start=$3 [QSA,L,NC]
# POST
RewriteRule ^post([0-9]+)\.html$ /viewtopic.php?p=$1 [QSA,L,NC]
# ACTIVE TOPICS
RewriteRule ^active-topics(-([0-9]+))?\.html$ /search.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]
# UNANSWERED TOPICS
RewriteRule ^unanswered(-([0-9]+))?\.html$ /search.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]
# NEW POSTS
RewriteRule ^newposts(-([0-9]+))?\.html$ /search.php?search_id=newposts&start=$2&sr=topics [QSA,L,NC]
# THE TEAM
RewriteRule ^the-team\.html$ /memberlist.php?mode=leaders [QSA,L,NC]
# HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES

# FORUM WITHOUT ID & DELIM
# THESE THREE LINES MUST BE LOCATED AT THE END OF YOUR HTACCESS TO WORK PROPERLY
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z0-9_-]+)/?(page([0-9]+)\.html)?$ /viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]
# END PHPBB PAGES
#####################################################
Simplemente es sustiirlo y ay esta? O tengo que hacer alguna cosa mas?

ESpeor que me podais orientar un poco, gracias.

Re: phpbb seo. Dudas modificacion .htaccess

Publicado: 30 Mar 2009, 15:54
por dvd_alon
YA no me deja editar, asi que añado aqui:

He probado lo que he comentado y por el momento he notado que si va a un foro no se ve el fondo.

http://www.melkoba.com/general1/" onclick="window.open(this.href);return false;

EN un pirncipo las url y demas (hasta lo poco que yo alcanzo) parce que va bien.

Re: phpbb seo. Dudas modificacion .htaccess

Publicado: 30 Mar 2009, 16:25
por dvd_alon
Ya se me paso el tiempo de editar el anterior tambien. He estado haciendo cambios y la url anterior ya no es valida. Ahora seria

http://www.melkoba.com/general/" onclick="window.open(this.href);return false;

Re: phpbb seo. Dudas modificacion .htaccess

Publicado: 31 Mar 2009, 14:51
por dvd_alon
Bueno, he actualizado a la version 0.4.8 pensando que quizas se solucionaria no hasido asi. Despues he revisado TODO el codigo y la unica diferencias que encuentro es esto:
Me manda hacer este cambio, y no no tengo ese codigo.
Spoiler
includes/functions_content.php

#-----[ FIND ]------------------------------------------
# NOTE : This part consists in adding the new code in get_username_string()

if (empty($_base_profile_url))
{
$_base_profile_url = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u={USER_ID}');
}
$profile_url = ($custom_profile_url !== false) ? $custom_profile_url . '&u=' . (int) $user_id : str_replace('={USER_ID}', '=' . (int) $user_id, $_base_profile_url);

#
#-----[ REPLACE WITH ]------------------------------------------
# NOTE : This part consists in adding the new code in get_username_string()

// http://www.phpBB-SEO.com" onclick="window.open(this.href);return false; SEO TOOLKIT BEGIN
/*if (empty($_base_profile_url))
{
$_base_profile_url = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u={USER_ID}');
}
$profile_url = ($custom_profile_url !== false) ? $custom_profile_url . '&u=' . (int) $user_id : str_replace('={USER_ID}', '=' . (int) $user_id, $_base_profile_url);*/
global $phpbb_seo;
$phpbb_seo->set_user_url( strip_tags($username), $user_id );
$profile_url = ($custom_profile_url !== false) ? $custom_profile_url . '&u=' . (int) $user_id : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . (int) $user_id);
// http://www.phpBB-SEO.com" onclick="window.open(this.href);return false; SEO TOOLKIT END

#
Se supone que tendria que estar aqui, que la funcion que indica arriba, pero no esta.
Spoiler
function get_username_string($mode, $user_id, $username, $username_colour = '', $guest_username = false, $custom_profile_url = false)
{
global $phpbb_root_path, $phpEx, $user, $auth; global $phpbb_seo;
$profile_url = '';
$username_colour = ($username_colour) ? '#' . $username_colour : '';

if ($guest_username === false)
{
$username = ($username) ? $username : $user->lang['GUEST'];
}
else
{
$username = ($user_id && $user_id != ANONYMOUS) ? $username : ((!empty($guest_username)) ? $guest_username : $user->lang['GUEST']);
}

// Only show the link if not anonymous
if ($mode != 'no_profile' && $user_id && $user_id != ANONYMOUS)
{
// Do not show the link if the user is already logged in but do not have u_viewprofile permissions (relevant for bots mostly).
// For all others the link leads to a login page or the profile.
if ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile'))
{
$profile_url = '';
}
else
{
$profile_url = ($custom_profile_url !== false) ? $custom_profile_url . '&u=' . (int) $user_id : str_replace('={USER_ID}', '=' . (int) $user_id, $_base_profile_url);
}
}
else
{
$profile_url = '';
}

switch ($mode)
{
case 'profile':
return $profile_url;
break;

case 'username':
return $username;
break;

case 'colour':
return $username_colour;
break;

case 'no_profile':
case 'full':
default:

$tpl = '';
if (!$profile_url && !$username_colour)
{
$tpl = '{USERNAME}';
}
else if (!$profile_url && $username_colour)
{
$tpl = '<span style="color: {USERNAME_COLOUR};" class="username-coloured">{USERNAME}</span>';
}
else if ($profile_url && !$username_colour)
{
$tpl = '<a href="{PROFILE_URL}">{USERNAME}</a>';
}
else if ($profile_url && $username_colour)
{
$tpl = '<a href="{PROFILE_URL}" style="color: {USERNAME_COLOUR};" class="username-coloured">{USERNAME}</a>';
}

return str_replace(array('{PROFILE_URL}', '{USERNAME_COLOUR}', '{USERNAME}'), array($profile_url, $username_colour, $username), $tpl);
break;
}
}
Aunque no se si tendra importancia...

¿ No se os ocurre nada que pueda pobrar?