| |
|
| :: |
| Author |
Message |
diabolic.bg

Joined: 04 Feb 2008 Posts: 47 Location: Bulgaria
|
Posted: Tue Feb 05, 2008 5:34 pm Post subject: meta tag installed, adding mod rewrite |
|
|
Hi !
I have a similar problem with .htaccess.
I have installed dynamic_meta_tagsV0-2-0 and Optimal_titlesV_1.0.0.
In phpbb_seo folder I already have phpbb_seo_class from dynamic_meta_tagsV0-2-0 mod. I make a new file:
[mod] Too much code[/mod]
Is it correct?
This is my .htaccess:
| Code: | # You could need to un-comment the following line
# Options +FollowSymlinks
RewriteEngine On
RewriteBase /
#########################################################
# PHPBB SEO REWRITE RULES #
#########################################################
# AUTHOR : DCZ http://www.phpbb-seo.com/
# STARTED : 01/2006
#####################################################
# FORUMS PAGES
########################
# FORUM INDEX (un-comment if used)
RewriteRule ^phpbb2/index\.html$ /phpbb2/index.php [QSA,L,NC]
# FORUM PROTECTION RULE
RewriteRule ^phpbb2/[a-z0-9_-]+/([^/]+\.html)$ /phpbb2/index.php [R=301,L,NC]
# CATEGORIES
RewriteRule ^phpbb2/cat([0-9]+)\.html$ /phpbb2/index.php?c=$1 [QSA,L,NC]
# PAGINATED FORUM
RewriteRule ^phpbb2/forum([0-9]+)-([0-9]+)\.html$ /phpbb2/viewforum.php?f=$1&start=$2 [QSA,L,NC]
# FORUM
RewriteRule ^phpbb2/forum([0-9]+)\.html$ /phpbb2/viewforum.php?f=$1 [QSA,L,NC]
# PAGINATED TOPIC
RewriteRule ^phpbb2/topic([0-9]+)-([0-9]+)\.html$ /phpbb2/viewtopic.php?t=$1&start=$2 [QSA,L,NC]
# TOPIC
RewriteRule ^phpbb2/topic([0-9]+)\.html$ /phpbb2/viewtopic.php?t=$1 [QSA,L,NC]
# POST
RewriteRule ^phpbb2/post([0-9]+)\.html$ /phpbb2/viewtopic.php?p=$1 [QSA,L,NC]
#PROFILES
RewriteRule ^phpbb2/member([0-9]+)\.html$ /phpbb2/profile.php?mode=viewprofile&u=$1 [QSA,L,NC]
# END PHPBB PAGES
#####################################################
|
My path is /htdocs/phpbb2/ (root/forum directory/). If I place .htaccess right in root folder, I receive Error 500.
If I place .htaccess in phpbb_seo folder or phpbb2/cashe/ I receive blank page.
I don't understand where I must place .htaccess.
In my root I have a few .htaccess files:
htdocs/forbidden/.htaccess
htdocs/xampp/.htaccess
htdocs/phpbb2/cashe/.htaccess and
htdocs/xampp/sqlite/.htaccess
Help me please!
Sorry for my mistakes but my english is not very good.  |
|
|
| Back to top |
|
 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
|
| Back to top |
|
 |
diabolic.bg

Joined: 04 Feb 2008 Posts: 47 Location: Bulgaria
|
Posted: Thu Feb 07, 2008 7:06 am Post subject: Re: meta tag installed, adding mod rewrite |
|
|
Thanks, dcz!
But I think you don't understand me. If I place .htaccess right in htdocs folder I get error 500:
| Quote: | Server error!
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.
If you think this is a server error, please contact the webmaster.
Error 500 |
If I place .htaccess right in htdocs/xampp/ folder I get blank page ant don't canget URL.
Maybe I must correct something?
Need I to correct phpbb to phpbb2 in phpbb_seo_class file?
What is wrong? I don't understand.  |
|
|
| Back to top |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3137
|
Posted: Thu Feb 07, 2008 9:09 am Post subject: Re: meta tag installed, adding mod rewrite |
|
|
Make sure mod_rewrite is available on your wamp installation.
You do not need to change anything in phpbb_seo_class.php, you just need to make sure the meta tag adding are where they should in phpbb_seo_class.php. |
_________________
|
|
| Back to top |
|
 |
diabolic.bg

Joined: 04 Feb 2008 Posts: 47 Location: Bulgaria
|
Posted: Thu Feb 07, 2008 10:16 am Post subject: Re: meta tag installed, adding mod rewrite |
|
|
Yes, I'm sure. The file phpbb_seo_class who I placed in my first post is in phpbb_seo folder but I think he isn't correspond with .htaccess file because it wrong placed.
If I place it in htdocs/xampp/.htaccess or htdocs/phpbb2/cashe/.htaccess, I get blank page and URLs are not changed.
If I don't place .htaccess, I again get blank page as I already said and URLs are not changed.
Tell me please where I must place .htaccess.
htdocs/forbidden/.htaccess
htdocs/xampp/.htaccess
htdocs/phpbb2/cashe/.htaccess and
htdocs/xampp/sqlite/.htaccess
In who folder is right place? |
|
|
| Back to top |
|
 |
HB phpBB SEO Team

Joined: 16 Oct 2006 Posts: 795
|
Posted: Fri Feb 08, 2008 3:43 am Post subject: Re: meta tag installed, adding mod rewrite |
|
|
I use xampplite and the .htaccess goes in the htdocs directory. When in doubt, go to the httpd.conf file in the apache conf directory. Search for this:
| Code: | | DocumentRoot "C:/xampplite/htdocs" |
That's where the .htaccess should go. Make certain this line is not commented:
| Code: | | LoadModule rewrite_module modules/mod_rewrite.so |
Also check this:
| Code: | <Directory "C:/xampplite/htdocs">
...
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All |
The AllowOverride All says .htaccess can change the parms set in httpd.conf. |
_________________ Dan Kehn |
|
| Back to top |
|
 |
diabolic.bg

Joined: 04 Feb 2008 Posts: 47 Location: Bulgaria
|
Posted: Fri Feb 08, 2008 6:47 am Post subject: Re: meta tag installed, adding mod rewrite |
|
|
Sorry it don't work too. My root is:
| Quote: | | DocumentRoot "C:/xAmp/xampp/htdocs" |
....
This was commented but I uncomment it:
| Code: | | LoadModule rewrite_module modules/mod_rewrite.so |
This was that way:
| Code: |
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All |
Now my .htaccess is working right in htdocs/ dir but I get blank page on index.php.  |
|
|
| Back to top |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3137
|
Posted: Mon Feb 11, 2008 10:27 am Post subject: Re: meta tag installed, adding mod rewrite |
|
|
| Try to activate phpBB debug in config.php (uncommenting the last two line) in case some useful error message shows up. If no message show up with debug, it's most likely a language pack issue, if so make sure you did all the required code change in the language packs. |
_________________
|
|
| Back to top |
|
 |
diabolic.bg

Joined: 04 Feb 2008 Posts: 47 Location: Bulgaria
|
Posted: Mon Feb 11, 2008 10:48 am Post subject: Re: meta tag installed, adding mod rewrite |
|
|
Sorry, I don't understand. In my config.php isn't commented lines.
| Code: | <?php
// phpBB 2.x auto-generated config file
// Do not change anything in this file!
$dbms = 'mysql4';
$dbhost = 'xxxxx';
$dbname = 'xxxxx';
$dbuser = 'xxxxx';
$dbpasswd = 'xxxxx';
$table_prefix = 'phpbb_';
define('PHPBB_INSTALLED', true);
?> |
Can I ask another question? I have tested
## MOD Title: phpBB static URLs mod_rewrite 1.0.0
## MOD Author: Craven de Kere.
It can works in my board.
Can it works with your Google Yahoo MSN Sitemaps and RSS (GYM) or will be make errors in maps?
Thanks in advance for the answer! |
|
|
| Back to top |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3137
|
Posted: Tue Feb 12, 2008 9:27 am Post subject: Re: meta tag installed, adding mod rewrite |
|
|
Ouups, sorry, I got confused between phpBB2 and phpBB3
Then, since it's local, you should have access to php error logs somewhere, could give us some more info about what's going on.
A blank page still means that an error occurred with no message display (due to server settings). |
_________________
|
|
| Back to top |
|
 |
diabolic.bg

Joined: 04 Feb 2008 Posts: 47 Location: Bulgaria
|
Posted: Thu Feb 14, 2008 12:28 pm Post subject: Re: meta tag installed, adding mod rewrite |
|
|
I still don't find out why I gets blank page. In my logs I don't find nothing.
Any ideas? Help me, please! |
|
|
| Back to top |
|
 |
diabolic.bg

Joined: 04 Feb 2008 Posts: 47 Location: Bulgaria
|
Posted: Fri Feb 15, 2008 5:46 pm Post subject: Re: meta tag installed, adding mod rewrite |
|
|
After the success with gym sitemaps I have installed again Simple mod rewrite and again get blank page.
In my phpbb_seo_class file after mod rewrite codes I add codes from dynamic_meta_tagsV0-2-0 mod.
And in .htaccess file in my root/ dir add the codes for mod rewrite before gim_sitemaps codes.
Help please! |
|
|
| Back to top |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3137
|
Posted: Sat Feb 16, 2008 9:12 am Post subject: Re: meta tag installed, adding mod rewrite |
|
|
| diabolic.bg wrote: |
In my phpbb_seo_class file after mod rewrite codes I add codes from dynamic_meta_tagsV0-2-0 mod.
|
For the third (at least) time within three threads, do not add the full content of the standalone phpbb_seo.php meta tag file.
All you need to do within the mod_rewrite phpbb_seo.php file is :
| Code: |
#
#-----[ OPEN ]------------------------------------------
#
phpbb_seo/phpbb_seo_class.php
#
#-----[ FIND ]------------------------------------------
#
/**
* constuctor
*/
function phpbb_seo() {
#
#-----[ FIND ]------------------------------------------
#
return;
}
#
#-----[ BEFORE, ADD ]------------------------------------------
#
// --> Meta tags
$this->seo_meta_tags();
#
#-----[ FIND ]------------------------------------------
#
}
?>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
// -- > Meta tags
var $seo_meta = array();
/**
* Returns meta tag code
*/
function build_meta($page_title = '') {
$meta_desc = ( $this->seo_meta['meta_desc'] != '' ) ? $this->seo_meta['meta_desc'] : $this->seo_meta['meta_desc_def'];
$keywords = ( $this->seo_meta['keywords'] != '' ) ? $this->seo_meta['keywords'] : $this->seo_meta['meta_keywords_def'];
$title = ( $this->seo_meta['meta_title'] != '' ) ? $this->seo_meta['meta_title'] : $page_title;
return sprintf( $this->seo_meta['meta_tpl'], $title, $this->seo_meta['meta_lang'], $meta_desc, $keywords, $this->seo_meta['meta_cat'], $this->seo_meta['meta_robots'] );
}
/**
* Returns a word list separated by comas
* You might want tu use mb_strlen() instead of strlen()
* if you are using UTF-8 : mb_strlen($word, 'UTF-8')
* you can as well change the minimum word size here : if ( strlen($word) >= 3 ) {
* Possible Options :
* - $limit = 0 means no limit.
* By default, ' . and , are deleted.
*/
function make_keywords($text, $limit = 15) {
$keywords = '';
$num = 0;
$text = preg_replace(array("`[[:punct:]]+`", "`[\s]+`"), array(" ", " "), strip_tags($text) );
$text = explode(" ", $text);
// We take the most used words first
$text = array_count_values($text);
foreach ($text as $word => $count) {
if ( strlen($word) >= 3 ) {
$keywords .= ($keywords == '') ? $word : ',' . $word;
$num++;
if ( $limit > 0 && $num >= $limit ) {
break;
}
}
}
return $keywords;
}
/**
* Filter php/html tags and white spaces and returns htmlspecialchared string
*/
function meta_filter_txt($text) {
return htmlspecialchars(preg_replace("`[\s]+`", " ", strip_tags($text) ) );
}
/**
* Initialize meta tags
* @access private
*/
function seo_meta_tags() {
global $board_config;
$this->seo_meta = array('meta_tpl' => '<meta name="title" content="%s">' . "\n" . '<meta name="description" lang="%s" content="%s">' . "\n" . '<meta name="keywords" content="%s">' . "\n" . '<meta name="category" content="%s">' . "\n" . '<meta name="robots" content="%s">'. "\n",
'meta_title' => '',
'meta_desc' => '',
'meta_keywords' => '',
// Here you can hard code a static default title, description and keywords
// As is, the mod will return information based on the phpbb config
'meta_title_def' => $this->meta_filter_txt($board_config['sitename']),
'meta_desc_def' => $this->meta_filter_txt($board_config['site_desc']),
'meta_keywords_def' => $this->make_keywords($board_config['site_desc']),
'meta_lang' => 'en',
'meta_cat' => 'general',
'meta_robots' => 'index,follow',
'meta_gened' => FALSE
);
return;
}
|
Let's make sure about this first. |
_________________
|
|
| Back to top |
|
 |
diabolic.bg

Joined: 04 Feb 2008 Posts: 47 Location: Bulgaria
|
Posted: Sat Feb 16, 2008 10:32 am Post subject: Re: meta tag installed, adding mod rewrite |
|
|
Thanks! I'm sure - my meta tags works and GYM works too, but here is my phpbb_seo_class as txt with GYM and Meta tags. Please, check it and tell me if I must correct something.
EDIT
In 16.15 GMT +2 I again try to start Simple rewrite mod and again get blank page. This is my log file from test:
Maybe it can help...
P.S. I cannot install mixed_mod_rewriteV0-2-4. In my board files have many differences. He is 2.0.18 patched to 2.0.22 and index.php is very different. |
|
|
| Back to top |
|
 |
diabolic.bg

Joined: 04 Feb 2008 Posts: 47 Location: Bulgaria
|
Posted: Wed Feb 20, 2008 9:24 am Post subject: Re: meta tag installed, adding mod rewrite |
|
|
Today is great day in my site's history!
Early this morning I have installed again Simple mod rewrite and now, after installing GYM sitemaps, I have a success. All mods (Simple mod rewrite, GYM sitemaps, Dynamic_meta_tagsV0-2-0, Optimal_titlesV_1.0.0 and Simple-Show-BotV0-0-2) now works together.
THANK YOU WISE BOYS
P.S. Of course I have added phpBB SEO link in my overall_footer.
You are great! |
|
|
| Back to top |
|
 |
|
|
| Navigation |
Similar Topics |
|
|
|
|
|
|
|