Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no forum image in categories. virtual directory activate #76

Open
Magnitude10 opened this issue Nov 7, 2014 · 20 comments
Open

no forum image in categories. virtual directory activate #76

Magnitude10 opened this issue Nov 7, 2014 · 20 comments

Comments

@Magnitude10
Copy link

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

@Magnitude10 Magnitude10 changed the title no forum image in categories no forum image in categories. virtual directory activate Nov 7, 2014
@hbcafe
Copy link

hbcafe commented Nov 7, 2014

This looks like a dup of #73

@Magnitude10
Copy link
Author

no virtual root but virtual directory

@hbcafe
Copy link

hbcafe commented Nov 7, 2014

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
Copy link
Author

# 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 Order Allow,Deny Deny from All Order Allow,Deny Deny from All Require all denied Require all denied

@Magnitude10
Copy link
Author

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

@hbcafe
Copy link

hbcafe commented Nov 7, 2014

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
Copy link

hbcafe commented Nov 7, 2014

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

@Magnitude10
Copy link
Author

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

@Magnitude10
Copy link
Author

true, 'modrtype' => 3, 'sql_rewrite' => false, 'profile_inj' => true, 'profile_vfolder' => true, 'profile_noids' => true, 'rewrite_usermsg' => false, 'rem_sid' => true, 'rem_hilit' => true, 'rem_small_words' => true, 'virtual_folder' => true, 'virtual_root' => false, 'cache_layer' => true, 'rem_ids' => true, 'redirect_404_forum' => true, 'redirect_404_topic' => true, 'copyrights' => array ( 'img' => false, 'txt' => '', 'title' => '', ), 'zero_dupe' => array ( 'on' => true, 'strict' => true, 'post_redir' => 'all', ), ); $forum_urls = array ( 1 => 'generale', 2 => 'presentazioni-saluti', 3 => 'discussioni', 4 => 'politica', 5 => 'religione', 6 => 'media', 7 => 'lavoro', 8 => 'istruzione', 9 => 'sanita', 10 => 'servizi', 13 => 'sociale', 14 => 'difesa', 15 => 'sport', 16 => 'ricerca', 17 => 'turismo', 18 => 'spettacolo', 19 => 'immigrazione', 20 => 'finanza', 21 => 'sicurezza-autorita', 22 => 'annunci', 23 => 'regolamento', );

@hbcafe
Copy link

hbcafe commented Nov 7, 2014

Try updating your .htaccess as I suggested earlier.

@Magnitude10
Copy link
Author

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 Order Allow,Deny Deny from All Order Allow,Deny Deny from All Require all denied Require all denied

@Magnitude10
Copy link
Author

no images when view categories

@Magnitude10
Copy link
Author

i have htaccess in the root phpbb. no domain

@hbcafe
Copy link

hbcafe commented Nov 7, 2014

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
Copy link
Author

forum category in url

@hbcafe
Copy link

hbcafe commented Nov 7, 2014

I'm not following you.

@hbcafe
Copy link

hbcafe commented Nov 8, 2014

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
Copy link
Member

dcz commented Nov 8, 2014

Please note that :

  • THIS IS NOT A SUPPORT FORUM
  • The whole code is unreleased beta, meaning that you cannot expect to use it without effort like checking the master branch, having a look at issues and pull request.

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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants