phpBBSEO / usu

Ultimate SEO URL
32 stars 25 forks source link

no forum image in categories. virtual directory activate #76

Open Magnitude10 opened 9 years ago

Magnitude10 commented 9 years ago

hi, virtual directory activate. when view categories no forum image

hbcafe commented 9 years ago

This looks like a dup of https://github.com/phpBBSEO/usu/issues/73

Magnitude10 commented 9 years ago

no virtual root but virtual directory

hbcafe commented 9 years ago

You will need to provide more information. What's in your config.runtime.php? Have you pulled the latest code from github? Have you made any modifications? What does your .htaccess look like?

Magnitude10 commented 9 years ago
# 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 ``` # Uncomment the statement below if you want to make use of # HTTP authentication and it does not already work. # This could be required if you are for example using PHP via Apache CGI. # RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] # REWRITE BASE RewriteBase /forum/ # HERE IS A GOOD PLACE TO FORCE CANONICAL DOMAIN # Define fully qualified ssl aware protocol RewriteCond %{SERVER_PORT}s ^(443(s)|[0-9]+s)$ RewriteRule ^.*$ - [env=HttpFullProto:http%2://] RewriteCond %{HTTP_HOST} !^revolutio\.altervista\.org$ [NC] RewriteRule ^(.*)$ %{ENV:HttpFullProto}revolutio.altervista.org/forum/$1 [QSA,L,R=301] # DO NOT GO FURTHER IF THE REQUESTED FILE / DIR DOES EXISTS RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule . - [L] # FORUM INDEX REWRITERULE WOULD STAND HERE IF USED. "forum" REQUIRES TO BE SET AS FORUM INDEX # RewriteRule ^forum\.html$ index.php [QSA,L,NC] # FORUM ALL MODES RewriteRule ^(forum|[a-z0-9_-]*-f)([0-9]+)/?(page([0-9]+)\.html)?$ viewforum.php?f=$2&start=$4 [QSA,L,NC] # TOPIC WITH VIRTUAL FOLDER ALL MODES RewriteRule ^(forum|[a-z0-9_-]*-f)([0-9]+)/(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$ viewtopic.php?f=$2&t=$4&start=$6 [QSA,L,NC] # TOPIC WITHOUT FORUM ID & DELIM ALL MODES RewriteRule ^([a-z0-9_-]*)/?(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$ viewtopic.php?forum_uri=$1&t=$3&start=$5 [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 ALL MODES RewriteRule ^(group|[a-z0-9_-]*-g)([0-9]+)(-([0-9]+))?\.html$ memberlist.php?mode=group&g=$2&start=$4 [QSA,L,NC] # POSTS 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] # UNREAD POSTS RewriteRule ^unreadposts(-([0-9]+))?\.html$ search.php?search_id=unreadposts&start=$2 [QSA,L,NC] # THE TEAM RewriteRule ^the-team\.html$ memberlist.php?mode=team [QSA,L,NC] # HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES # FORUM WITHOUT ID & DELIM ALL MODES # THESE 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] # FIX RELATIVE PATHS : FILES RewriteRule ^.+/(style\.php|ucp\.php|mcp\.php|faq\.php|download/file.php)$ $1 [QSA,L,NC,R=301] # FIX RELATIVE PATHS : IMAGES RewriteRule ^.+/(styles/.*|images/.*)/$ $1 [QSA,L,NC,R=301] # # The following 3 lines will rewrite URLs passed through the front controller # to not require app.php in the actual URL. In other words, a controller is # by default accessed at /app.php/my/controller, but can also be accessed at # /my/controller # RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ app.php [QSA,L] ```

With Apache 2.4 the "Order, Deny" syntax has been deprecated and moved from

module mod_authz_host to a new module called mod_access_compat (which may be

disabled) and a new "Require" syntax has been introduced to mod_authz_host.

We could just conditionally provide both versions, but unfortunately Apache

does not explicitly tell us its version if the module mod_version is not

available. In this case, we check for the availability of module

mod_authz_core (which should be on 2.4 or higher only) as a best guess.

Order Allow,Deny Deny from All Order Allow,Deny Deny from All = 2.4> Require all denied Require all denied

<IfModule !mod_version.c> <IfModule !mod_authz_core.c> <Files "config.php"> Order Allow,Deny Deny from All <Files "common.php"> Order Allow,Deny Deny from All

Require all denied Require all denied

Magnitude10 commented 9 years ago

version: 2.0.0-b2 where is config.runtime.php?

hbcafe commented 9 years ago

You don't have the latest code, you'll need to get it from github (not sure it's been merged yet into master). In the meantime, you could update .htaccess as shown below:

FIND: /your-forum-root-here/ replace with yours.

FIX RELATIVE PATHS : FILES

RewriteRule ^.+/(style.php|ucp.php|mcp.php|faq.php|download/file.php)$ /your-forum-root-here/$1 [QSA,L,NC,R=301]

FIX RELATIVE PATHS : IMAGES

RewriteRule ^.+/(styles/.|images/.)/$ /your-forum-root-here/$1 [QSA,L,NC,R=301]

hbcafe commented 9 years ago

config.runtime.php is in ext/phpbbseo/cache.

Magnitude10 commented 9 years ago

I downloaded the package from here. version is the same thanks

Magnitude10 commented 9 years ago

<?php /**

hbcafe commented 9 years ago

Try updating your .htaccess as I suggested earlier.

Magnitude10 commented 9 years ago

my root phpbb in /forum/ add: RewriteRule ^.+/(style.php|ucp.php|mcp.php|faq.php|download/file.php)$ /forum/$1 [QSA,L,NC,R=301] RewriteRule ^.+/(styles/.|images/.)/$ /forum/$1 [QSA,L,NC,R=301]

dont work

my htaccess:

# 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 ``` # Uncomment the statement below if you want to make use of # HTTP authentication and it does not already work. # This could be required if you are for example using PHP via Apache CGI. # RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] # REWRITE BASE RewriteBase /forum/ # HERE IS A GOOD PLACE TO FORCE CANONICAL DOMAIN # Define fully qualified ssl aware protocol RewriteCond %{SERVER_PORT}s ^(443(s)|[0-9]+s)$ RewriteRule ^.*$ - [env=HttpFullProto:http%2://] RewriteCond %{HTTP_HOST} !^revolutio\.altervista\.org$ [NC] RewriteRule ^(.*)$ %{ENV:HttpFullProto}revolutio.altervista.org/forum/$1 [QSA,L,R=301] # DO NOT GO FURTHER IF THE REQUESTED FILE / DIR DOES EXISTS RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule . - [L] # FORUM INDEX REWRITERULE WOULD STAND HERE IF USED. "forum" REQUIRES TO BE SET AS FORUM INDEX # RewriteRule ^forum\.html$ index.php [QSA,L,NC] # FORUM ALL MODES RewriteRule ^(forum|[a-z0-9_-]*-f)([0-9]+)/?(page([0-9]+)\.html)?$ viewforum.php?f=$2&start=$4 [QSA,L,NC] # TOPIC WITH VIRTUAL FOLDER ALL MODES RewriteRule ^(forum|[a-z0-9_-]*-f)([0-9]+)/(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$ viewtopic.php?f=$2&t=$4&start=$6 [QSA,L,NC] # TOPIC WITHOUT FORUM ID & DELIM ALL MODES RewriteRule ^([a-z0-9_-]*)/?(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$ viewtopic.php?forum_uri=$1&t=$3&start=$5 [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 ALL MODES RewriteRule ^(group|[a-z0-9_-]*-g)([0-9]+)(-([0-9]+))?\.html$ memberlist.php?mode=group&g=$2&start=$4 [QSA,L,NC] # POSTS 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] # UNREAD POSTS RewriteRule ^unreadposts(-([0-9]+))?\.html$ search.php?search_id=unreadposts&start=$2 [QSA,L,NC] # THE TEAM RewriteRule ^the-team\.html$ memberlist.php?mode=team [QSA,L,NC] # HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES # FORUM WITHOUT ID & DELIM ALL MODES # THESE 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] # FIX RELATIVE PATHS : FILES RewriteRule ^.+/(style.php|ucp.php|mcp.php|faq.php|download/file.php)$ /forum/$1 [QSA,L,NC,R=301] #RewriteRule ^.+/(style\.php|ucp\.php|mcp\.php|faq\.php|download/file.php)$ $1 [QSA,L,NC,R=301] # FIX RELATIVE PATHS : IMAGES RewriteRule ^.+/(styles/.|images/.)/$ /forum/$1 [QSA,L,NC,R=301] #RewriteRule ^.+/(styles/.*|images/.*)/$ $1 [QSA,L,NC,R=301] # # The following 3 lines will rewrite URLs passed through the front controller # to not require app.php in the actual URL. In other words, a controller is # by default accessed at /app.php/my/controller, but can also be accessed at # /my/controller # RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ app.php [QSA,L] ```

With Apache 2.4 the "Order, Deny" syntax has been deprecated and moved from

module mod_authz_host to a new module called mod_access_compat (which may be

disabled) and a new "Require" syntax has been introduced to mod_authz_host.

We could just conditionally provide both versions, but unfortunately Apache

does not explicitly tell us its version if the module mod_version is not

available. In this case, we check for the availability of module

mod_authz_core (which should be on 2.4 or higher only) as a best guess.

Order Allow,Deny Deny from All Order Allow,Deny Deny from All = 2.4> Require all denied Require all denied

<IfModule !mod_version.c> <IfModule !mod_authz_core.c> <Files "config.php"> Order Allow,Deny Deny from All <Files "common.php"> Order Allow,Deny Deny from All

Require all denied Require all denied

Magnitude10 commented 9 years ago

no images when view categories

Magnitude10 commented 9 years ago

i have htaccess in the root phpbb. no domain

hbcafe commented 9 years ago

Not sure what the problem is, you'll need to investigate. Start by using the actual URL of the "missing" category image (not sure what you mean by this... what's a "category image" anyway?) Try looking in the Chrome inspector (select where it should be and select "Inspect element"), then look at the HTML DOM.

Of course, I'm assuming you have some basic programming skills above. If that's not the case, you will have to wait until one of the phpBB-SEO team members recreates it (I'm not available to investigate at this time).

Magnitude10 commented 9 years ago

forum category in url

hbcafe commented 9 years ago

I'm not following you.

Magnitude10 commented 9 years ago

position forum image: http://revolutio.altervista.org/forum/images/forum_icons/ambiente.png when i am in a forum category : http://revolutio.altervista.org/forum/discussioni/images/forum_icons/ambiente.png

work: http://revolutio.altervista.org/forum/ dont work: http://revolutio.altervista.org/forum/discussioni/

hbcafe commented 9 years ago

This looks like a template that isn't prosilver (I don't recognize "forum_icons"). The .htaccess RELATIVE PATHS "fix" only works for prosilver's subdirectories. If you have another template with other directories, you'll have to add .htaccess rules to map them. This is only necessary for the virtual folders options (dcz would have to explain why it's necessary; I don't know the specifics).

dcz commented 9 years ago

Please note that :

and PLEASE do not post the whole source as this create a lot of unnecessary mess.

The code is pretty close to stable now, but there are some bugs left at this stage.

SiteSplat commented 8 years ago

This is still an issue when you browse the category. Reason being, it uses the virtual folder, therefore it appends the virtual folder and then the relative path. This obviously results in a broken link

www.myforum.com/my_category/images/read.png

where it should actually be:

www.myforum.com/images/read.png

you can easily replicate it via ACP if you use an image in a forum in a category, then you browse the main category to see the broken images caused by the virtual folder.

Main Cat -> forum 1 (image applied here)

Now browse Main Cat and there you go the broken image on forum 1.