[archive] phpBB SEO Advanced mod Rewrite V 0.0.2

phpBB2 SEO Advanced mod Rewrite support forum.
This mods performs URL rewriting for phpBB, injecting categories, forums and topic titles in their URLs.

Moderator: Moderators

Postby dcz » Tue Oct 24, 2006 4:52 pm

And welcome :D

Well it looks like you installed the phpBB SEO mixed mod rewrite php code changes with the phpBB SEO advanced (this mod's thread) .htaccess rewriterules.

So if you which to go for the mixed one, you'll have to change two lines in your .htaccess, should be something like :

Open :

Code: Select all
.htaccess


Find :

Code: Select all
# PAGINATED TOPIC
RewriteRule ^.+-vt([0-9]+)-([0-9]+)\.html$ /viewtopic.php?t=$1&start=$2 [QSA,L]
# TOPIC
RewriteRule ^.+-vt([0-9]+)\.html$ /viewtopic.php?t=$1 [QSA,L]


Replace with :

Code: Select all
# PAGINATED TOPIC
RewriteRule ^topic([0-9]+)-([0-9]+)\.html$ /viewtopic.php?t=$1&start=$2 [QSA,L]
# TOPIC
RewriteRule ^topic([0-9]+)\.html$ /viewtopic.php?t=$1 [QSA,L]


If you'd prefer to go for the advanced one (topic title injection in url), then you should redo the php code changes part over the one you have already done (they are done at the same place in the files).

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21411
Joined: Fri Apr 28, 2006 9:03 pm

Advertisement

Postby yash » Wed Oct 25, 2006 9:46 am

Thanks dcz for fast reply,

I am using advanced one but i am not able to understand for which php code you are talking about, can you please tell me which part or file i have to do redo for this...
yash
 
Posts: 2
Joined: Tue Oct 24, 2006 12:40 pm

Postby dcz » Wed Oct 25, 2006 11:01 am

Well, the fact your forum is outputting links link /topicxx.html tells us you installed the mixed mod rewrite.

As the advanced one is only adding more changes, you can safely do as if you installed it from scratch over the already modded for mixed one files.
You'll only find half the job done and will have to fully overwrite the append_sid function in includes/sessions/.

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21411
Joined: Fri Apr 28, 2006 9:03 pm

Postby Snk » Wed Nov 08, 2006 12:16 am

Hi, I have 2 questions:

1)I've created one subfolder called "support" and I've created .htaccess file like that:

Code: Select all
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
#########################################################
# PHPBB SEO REWRITE RULES            #
#########################################################
# AUTHOR : dcz http://www.phpbb-seo.com/
# STARTED : 01/2006
#####################################################
# FORUMS PAGES
########################
# FORUM PROTECTION RULE
RewriteRule ^support/.+/([^/]+\.html)$ /index.php [R=301,L]
# CATEGORIES
RewriteRule ^support/.+-vc([0-9]+)\.html$ /index.php?c=$1 [QSA,L]
# PAGINATED FORUM
RewriteRule ^support/.+-vf([0-9]+)-([0-9]+)\.html$ /viewforum.php?f=$1&start=$2 [QSA,L]
# FORUM
RewriteRule ^support/.+-vf([0-9]+)\.html$ /viewforum.php?f=$1 [QSA,L]
# PAGINATED TOPIC
RewriteRule ^support/.+-vt([0-9]+)-([0-9]+)\.html$ /viewtopic.php?t=$1&start=$2 [QSA,L]
# TOPIC
RewriteRule ^support/.+-vt([0-9]+)\.html$ /viewtopic.php?t=$1 [QSA,L]
# POST
RewriteRule ^support/post([0-9]+)\.html$ /viewtopic.php?p=$1 [QSA,L]
#PROFILES
RewriteRule ^support/member([0-9]+)\.html$ /profile.php?mode=viewprofile&u=$1 [QSA,L]
# END PHPBB PAGES
#####################################################


and robots.txt

Code: Select all
User-agent: *
Disallow: /support/viewtopic.php
Disallow: /support/viewforum.php
Disallow: /support/index.php?
Disallow: /support/posting.php
Disallow: /support/groupcp.php
Disallow: /support/search.php
Disallow: /support/login.php
Disallow: /support/post
Disallow: /support/member
Disallow: /support/profile.php
Disallow: /support/memberlist.php
Disallow: /support/faq.php

[code]

But not work.
Maybe because is a subdomain like http://support.domain.com ?
Because I've used that on my other forum on root and all works perfectly.

2)I've 2 folders called /support/ (where there is a forum) and one called /friends/ (where there is a forum again).
Can I use SEO mod for any 2 forums?
like http://support.domain.com and http://friends.domain.com with the same .htaccess file?

thx
Snk
 
Posts: 4
Joined: Wed Nov 08, 2006 12:08 am

Postby dcz » Wed Nov 08, 2006 9:37 am

And welcome :D

I think you're just confusing about domains and sub domains.

A sub domain is a genuine domain, and actually, www.example.com is a sub domain of example.com, the real main domain.

So if, for example you install a web site in your domain's root, let's call the folder www/, and then install phpBB in www/support/, while at the same time you create a sub domain called support.example.com linked to www/support/, then it's www/support/ to be the support.example.com's root.
All is like if phpBB was installed in this sub domain's root.

So you don't need no path in .htaccess, and it should be located in the domain's root, eg, the sub domain's one : www/support/.

And you don't want to let any possible access through www.example.com/support/, but only from support.example.com for the forum.

This can be done easy with few redirections. Please start a new thread in the apache mod rewrite forum if you need help on this.

In the forum folder all that would be required in the .htaccess to prevent any access from the main domain (as they would all be duplicates), you can just install the www prefix redirection in it.

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21411
Joined: Fri Apr 28, 2006 9:03 pm

Postby Snk » Wed Nov 08, 2006 9:51 am

thx a lot :)
Snk
 
Posts: 4
Joined: Wed Nov 08, 2006 12:08 am

URL-rewrite

Postby pakpoint » Thu Nov 09, 2006 7:31 am

I have my website installed on IIS, who I can use this MOD? any link to download this/or any other rewrite mod for IIS
pakpoint
 
Posts: 4
Joined: Thu Nov 09, 2006 7:27 am

Postby AmirAbbas » Thu Nov 09, 2006 8:23 am

hi

DCZ are developing mod rewrite for IIS
you can find more information at this topic

admin can give you more information
User avatar
AmirAbbas
phpBB SEO Team
phpBB SEO Team
 
Posts: 534
Joined: Thu May 11, 2006 3:30 pm
Location: IRAN

Postby pakpoint » Thu Nov 09, 2006 11:07 am

I am very new to phpbb, i have seen that post but i am unable to understand where from to download an mod for IIS
pakpoint
 
Posts: 4
Joined: Thu Nov 09, 2006 7:27 am

Postby dcz » Thu Nov 09, 2006 10:32 pm

Download the mod from this thread and use the httpd.ini from the other one where I replied to you as well ;)

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21411
Joined: Fri Apr 28, 2006 9:03 pm

Postby arch_stanton » Thu Nov 23, 2006 11:21 am

I am about to try this mod on my test forum and I have three queries:

1) I have an anti-hotlinking script in my .htaccess on the server at root level:

Code: Select all
#--ANTI-HOTLINK--
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^(http://|https://)(www.)?(gladtalk.co.uk).*$ [NC]
RewriteRule \.(jpe?g|gif|bmp|png)$ - [F]

#++ANTI-HOTLINK++


Should I add the seo-mod .htaccess script before or after the above? And should I leave out the RewriteEngine on rule if it has already been included once, as above?


2) I want to use this on my test forum ONLY (which is in a folder called /test/) until I am sure it is working properly. I understand I must put the .htaccess at root level, so how can I test it without screwing up my live forum?


3) Is it compatible with Simple Subforums?
arch_stanton
PR1
PR1
 
Posts: 163
Joined: Wed Oct 04, 2006 9:48 am

Postby dcz » Thu Nov 23, 2006 5:41 pm

So
1)
Code: Select all
#--ANTI-HOTLINK--
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^(http://|https://)(www.)?(gladtalk.co.uk).*$ [NC]
RewriteRule \.(jpe?g|gif|bmp|png)$ - [F]

#++ANTI-HOTLINK++

# Here the www prefix redirection ...

# Here goes the phpBB SEO rewriterules ...


I just added the RewriteBase / which will make the following work faster.
The www prefix redirection is important, you'll find it in this post.
Just add the advanced rewriterules after you hotlinking and the www prefix redirection.

2) Well, it should not mess up with anything since we include the path in the rewriterules. They will only be used within the test/ folder.

So you just need to use the second .htaccess in the mod, the one for when phpBB is not installed in the root and change the phpBB/ paths to test/.
So just put those after the other rewriterules that may be already there, and it will be ok.

3) It is compatible with simple sub forum, the patch can be found here.

;)
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21411
Joined: Fri Apr 28, 2006 9:03 pm

Postby arch_stanton » Thu Nov 23, 2006 11:11 pm

dcz wrote:So
1)
Code: Select all
#--ANTI-HOTLINK--
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^(http://|https://)(www.)?(gladtalk.co.uk).*$ [NC]
RewriteRule \.(jpe?g|gif|bmp|png)$ - [F]

#++ANTI-HOTLINK++

# Here the www prefix redirection ...

# Here goes the phpBB SEO rewriterules ...


I just added the RewriteBase / which will make the following work faster.
The www prefix redirection is important, you'll find it in this post.
Just add the advanced rewriterules after you hotlinking and the www prefix redirection.

2) Well, it should not mess up with anything since we include the path in the rewriterules. They will only be used within the test/ folder.

So you just need to use the second .htaccess in the mod, the one for when phpBB is not installed in the root and change the phpBB/ paths to test/.
So just put those after the other rewriterules that may be already there, and it will be ok.

3) It is compatible with simple sub forum, the patch can be found here.

;)


OK, one other thing. Think I read somewhere that there is an incompatibility with Today/Yesterday mod too? What is the fix for that?
arch_stanton
PR1
PR1
 
Posts: 163
Joined: Wed Oct 04, 2006 9:48 am

Postby dcz » Thu Nov 23, 2006 11:37 pm

Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21411
Joined: Fri Apr 28, 2006 9:03 pm

Postby arch_stanton » Fri Nov 24, 2006 12:07 am

dcz wrote:http://www.phpbb-seo.com/boards/phpbb-seo-mods/discussions-vt87.html

;)

Thanks. :lol:

I have a database error message:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/paul/domains/gladtalk.co.uk/public_html/test/includes/functions.php on line 291

Is this because I haven't included the today/yesterday patch yet (am working on it now) or because of some other error in my functions.php page?
arch_stanton
PR1
PR1
 
Posts: 163
Joined: Wed Oct 04, 2006 9:48 am

PreviousNext

Return to phpBB2 Advanced mod Rewrite

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 2 guests