Moderator: Moderators

RewriteRule ^impressum\.html$ /impressum.php [QSA,L,NC] $this->rewrite_method[$phpbb_root_path]['ppshop'] = 'ppshop';
$this->file_hbase['ppshop'] = $this->seo_path['phpbb_url']; // Let's make sure that settings are consistent
$this->check_config(); /**
* URL rewritting for ppshop.php
* @access private
*/
function ppshop() {
$this->path = $this->seo_path['phpbb_url'] . 'boardshop/';
$this->url = 'shop.html';
return;
} // Let's make sure that settings are consistent
$this->check_config();
}
// Here start the add-on methodsRewriteRule ^boardshop/shop\.html$ /ppshop.php [QSA,L,NC]
dcz wrote:and do not hesitate to ask for more details
$user_id = !empty($this->get_vars['author_id']) ? $this->get_vars['author_id'] : ( isset($this->seo_url['username'][rawurldecode(@$this->get_vars['author'])]) ? $this->seo_url['username'][rawurldecode($this->get_vars['author'])] : 0);
if ( $user_id && isset($this->seo_url['user'][$user_id]) ) {
// Filter default params
$this->filter_get_var($this->phpbb_filter['search']);
$this->{$this->paginate_method['user']}($this->seo_ext['user']);
$sr = (@$this->get_vars['sr'] == 'topics' ) ? 'topics' : 'posts';
$this->url = $this->seo_url['user'][$user_id] . $this->seo_delim['sr'] . $sr . $this->start;
unset($this->get_vars['author_id'], $this->get_vars['author'], $this->get_vars['sr']);
return;
} elseif ( $this->seo_opt['profile_noids'] && !empty($this->get_vars['author']) ) {
// Filter default params
$this->filter_get_var($this->phpbb_filter['search']);
$this->rewrite_pagination_page();
$sr = (@$this->get_vars['sr'] == 'topics' ) ? '/topics' : '/posts';
$this->url = $this->seo_static['user'] . '/' . $this->seo_url_encode($this->get_vars['author']) . $sr . $this->start;
unset($this->get_vars['author'], $this->get_vars['author_id'], $this->get_vars['sr']);
return;
phpBB3-SEO-Premod_V_3.0.5.txt wrote:=> The first setting to do is to select which static part to use in your URLs.
To do so, you can override default values in phpbb_seo/includes/setup_phpbb_seo.php, still before :
- Code: Select all
// Let's make sure that settings are consistent
$this->check_config();
EXAMPLES :
__________
- Code: Select all
// => the-team :
$this->seo_static['leaders'] = 'my-team'; // instead of the default "the-team"
// => announces :
$this->seo_static['global_announce'] = 'announcements'; // instead of the default "announces"
- Code: Select all
// => Active topics :
$this->seo_static['atopic'] = 'important-topics'; // instead of the default "active-topics"
- Code: Select all
// => Unaswered :
$this->seo_static['utopic'] = 'not-answered'; // instead of the default "unanswered"
- Code: Select all
// => Newposts :
$this->seo_static['npost'] = 'new-messages'; // instead of the default "newposts"
=> As well as for (and the same way) :
- Code: Select all
forum ($this->seo_static['forum']), topic ($this->seo_static['topic']), post ($this->seo_static['post']), member ($this->seo_static['member']), groups ($this->seo_static['group']), attachments virtual directory ($this->seo_static['file_index'], read the comments in the file for more attachments customizing) and virtual folder pagination ($this->seo_static['page'])
$this->seo_static['topic'] = 'beitraege';# OLD TOPIC
RewriteRule ^[a-z0-9_/-]*topic([0-9]+)/?(seite([0-9]+)\.html)?$ viewtopic.php?t=$1&start=$3 [QSA,L,NC]

RewriteRule ^mitglieder/([^/]+)/(themen|beitraege)/?(seite([0-9]+)\.html)?$ /search.php?author=$1&sr=$2&start=$4 [QSA,L,NC]
RewriteRule ^member/([^/]+)/(topics|posts)/?(page([0-9]+)\.html)?$ /search.php?author=$1&sr=$2&start=$4 [QSA,L,NC]
$sr = (@$this->get_vars['sr'] == 'topics' ) ? '/topics' : '/posts';
$this->url = $this->seo_static['user'] . '/' . $this->seo_url_encode($this->get_vars['author']) . $sr . $this->start;

/// Arcade list rewriting /////////////
$this->rewrite_method[$phpbb_root_path]['arcade_list'] = 'arcade_list';
$this->file_hbase['arcade_list'] = $this->seo_path['phpbb_url'];
$this->rewrite_method[$phpbb_root_path]['arcade_topplayers'] = 'arcade_topplayers';
$this->file_hbase['arcade_topplayers'] = $this->seo_path['phpbb_url'];
///end arcadelist
// Let's make sure that settings are consistent
$this->check_config();
}
// Here start the add-on methods
/**
*
*/
//arcadelist//
function arcade_list() {
$this->path = $this->seo_path['phpbb_url'] . '';
$this->url = 'arcade.html';
return;
}
function arcade_topplayers() {
$this->path = $this->seo_path['phpbb_url'] . '';
$this->url = 'stats-players.html';
return;

Laurent85 wrote:I did what you advise in setup_phpbb_seo for static url and it works well and my new url is ok and well rewritten on link , but when I do it another time the second url is rewritten only if I write in my browser but not on the direct link : it stays page.php
$this->rewrite_method[$phpbb_root_path]['page'] = 'name_of_the_method_to_use';
Users browsing this forum: Google [Bot] and 5 guests