serimu (@serimu)

Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)

  • serimu
    Member

    @serimu

    I changes ifmodule to IfModule but it did not fixed the problem. And I dont know why it is lowercase for my .htaccess file. It may reason from a previous bbpress rewrite-rules.php or not. I dont know, and I also could not figure out that difference.

    I also tried to rename wordpress’ .htaccess file to check whether it creates a problem or not. When I do that, I get my website working for root and all wordpress pages are not reachable. Forum is the same. So I get an idea, is there any problem with the server or apache for reading the .htaccess file located on /forum folder. Is there any option on apache, or somewhere on the server to read or not to read the .htaccess files on subfolders?

    And I contacted to technical stuff of hosting company, and he asked for the apache version where I was using my site with no problem. It was Apache 1.3 , and this vps has Apache 2. So he said he will try it with apache 1.3 to check whether it is working or not.

    UPDATE: I added a rewrite rule to .htaccess file on /forum folder to check whether it works for a simple redirect or not. And it worked for:

    Redirect /forum/a/ http://www.domain.com/b/


    serimu
    Member

    @serimu

    thanks for your reply, I am sending my httpd.conf, and htaccess files for wordpress and bbpress. Im also using gallery2 which is located at /somegalleryfolder. I use a plugin to integrate it with wordpress. But it has no problem, before or after I moved to the new vps. Bbpress is located at /forum folder. And its htaccess is contains only the code generated by bb-admin/rewrite-rules.php

    I found my httpd.conf file, I dont know whether there is a security issue to put it here or not. But I hope it give you some idea about what could be problem:

    #

    # This is the main Apache HTTP server configuration file. It contains the

    # configuration directives that give the server its instructions.

    # See <URL:http://httpd.apache.org/docs/2.2> for detailed information.

    # In particular, see

    # <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>

    # for a discussion of each configuration directive.

    #

    # Do NOT simply read the instructions in here without understanding

    # what they do. They're here only as hints or reminders. If you are unsure

    # consult the online docs. You have been warned.

    ServerRoot “/etc/httpd”

    Listen 80

    #LoadModule php4_module /usr/lib/apache/libphp4.so

    LoadModule php5_module /usr/lib/apache/libphp5.so

    #LoadModule suphp_module /usr/lib/apache/mod_suphp.so

    LoadModule php5_module /usr/lib/apache/libphp5.so

    User apache

    Group apache

    ServerAdmin admin@localhost

    DocumentRoot “/var/www/html”

    <Directory /home/*>

    AllowOverride All

    Options +MultiViews -Indexes +FollowSymlinks +IncludesNoExec +Includes

    <Limit GET POST OPTIONS PROPFIND>

    Order allow,deny

    Allow from all

    </Limit>

    <LimitExcept GET POST OPTIONS PROPFIND>

    Order deny,allow

    Deny from all

    </LimitExcept>

    </Directory>

    <Directory />

    Options All

    AllowOverride All

    </Directory>

    <Directory “/var/www/html”>

    Options +Indexes +FollowSymLinks

    AllowOverride None

    Order allow,deny

    Allow from all

    <IfModule mod_suphp.c>

    suPHP_Engine On

    suPHP_UserGroup webapps webapps

    </IfModule>

    </Directory>

    <IfModule dir_module>

    DirectoryIndex index.html index.htm index.shtml index.php index.php5 index.php4 index.php3 index.phtml index.cgi

    </IfModule>

    <FilesMatch “^.ht”>

    Order allow,deny

    Deny from all

    Satisfy All

    </FilesMatch>

    ErrorLog /var/log/httpd/error_log

    LogLevel warn

    <IfModule log_config_module>

    #replace %b with %O for more accurate logging

    <IfModule mod_logio.c>

    LogFormat “%h %l %u %t “%r” %>s %O “%{Referer}i” “%{User-Agent}i”” combined

    LogFormat “%h %l %u %t “%r” %>s %O” common

    LogFormat “%O” bytes

    LogFormat “%h %l %u %t “%r” %>s %b “%{Referer}i” “%{User-Agent}i” %I %O” combinedio

    </IfModule>

    CustomLog /var/log/httpd/access_log common

    </IfModule>

    <IfModule alias_module>

    # Include some DirectAdmin alias

    Include conf/extra/httpd-alias.conf

    </IfModule>

    <Directory “/var/www/cgi-bin”>

    AllowOverride None

    Options None

    Order allow,deny

    Allow from all

    </Directory>

    DefaultType text/plain

    <IfModule mime_module>

    TypesConfig conf/mime.types

    AddType application/x-gzip .tgz

    AddEncoding x-compress .Z

    AddEncoding x-gzip .gz .tgz

    AddType application/x-compress .Z

    AddType application/x-gzip .gz .tgz

    AddHandler cgi-script .cgi

    AddHandler type-map var

    AddType text/html .shtml

    AddOutputFilter INCLUDES .shtml

    AddType video/x-ms-asf .avi

    AddType video/mpeg .mpg

    AddType video/mpeg .mpeg

    AddType video/quicktime .mov

    AddType video/x-ms-wmv .wmv

    </IfModule>

    #EnableMMAP off

    #EnableSendfile off

    #######################################################################################

    # Do not change anything in included files, because they are rewritten by DirectAdmin #

    #######################################################################################

    # This is needed for PHP

    Include conf/extra/httpd-php-handlers.conf

    # Server-pool management (MPM specific)

    Include conf/extra/httpd-mpm.conf

    # Multi-language error messages

    Include conf/extra/httpd-multilang-errordoc.conf

    # Fancy directory listings

    Include conf/extra/httpd-autoindex.conf

    # Language settings

    Include conf/extra/httpd-languages.conf

    # User home directories

    #Include conf/extra/httpd-userdir.conf

    # Real-time info on requests and configuration

    Include conf/extra/httpd-info.conf

    # Virtual hosts

    Include conf/extra/httpd-vhosts.conf

    # Local access to the Apache HTTP Server Manual

    #Include conf/extra/httpd-manual.conf

    # Distributed authoring and versioning (WebDAV)

    Include conf/extra/httpd-dav.conf

    # Various default settings

    Include conf/extra/httpd-default.conf

    # Secure (SSL/TLS) connections

    Include conf/extra/httpd-ssl.conf

    # Deflate module settings

    Include conf/extra/httpd-deflate.conf

    # All the DirectAdmin vhosts

    Include conf/extra/directadmin-vhosts.conf

    # All suPHP directives

    Include conf/extra/httpd-suphp.conf

    # All the other includes needed by the custombuild script

    Include conf/extra/httpd-includes.conf

    #######################################################################################

    # End of included files that are rewritten by DirectAdmin #

    #######################################################################################

    <IfModule ssl_module>

    SSLRandomSeed startup builtin

    SSLRandomSeed connect builtin

    </IfModule>

    and this is my wordpress .htaccess file, it is in root folder for the domain

    php_value upload_max_filesize "50M"

    # BEGIN WordPress

    <IfModule mod_rewrite.c>

    RewriteEngine On

    RewriteBase /

    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule . /index.php [L]

    </IfModule>

    # END WordPress

    # BEGIN Url Rewrite section

    # (Automatically generated. Do not edit this section)

    <IfModule mod_rewrite.c>

    RewriteEngine On

    RewriteBase /

    RewriteCond %{REQUEST_FILENAME} -f [OR]

    RewriteCond %{REQUEST_FILENAME} -d [OR]

    RewriteCond %{REQUEST_FILENAME} gallery_remote2.php

    RewriteCond %{REQUEST_URI} !/wp-gallery2.php$

    RewriteRule . – [L]

    RewriteCond %{QUERY_STRING} view=core.DownloadItem

    RewriteCond %{HTTP:Referer} !^[a-zA-Z0-9+.-]+://www.domain.com/ [NC]

    RewriteCond %{HTTP:Referer} !^$

    RewriteRule . /wp-gallery2.php [F,L]

    RewriteCond %{QUERY_STRING} g2_view=core.DownloadItem

    RewriteCond %{QUERY_STRING} g2_itemId=([0-9]+)

    RewriteCond %{HTTP:Referer} !^[a-zA-Z0-9+.-]+://www.domain.com/ [NC]

    RewriteCond %{HTTP:Referer} !^$

    RewriteRule . /galery/main.php?g2_view=rewrite.DownloadItem&g2_itemId=%1 [L]

    RewriteCond %{THE_REQUEST} /sitemap(?.| .)

    RewriteCond %{REQUEST_URI} !/wp-gallery2.php$

    RewriteRule . /wp-gallery2.php?g2_view=sitemap.Sitemap [QSA,L]

    RewriteCond %{THE_REQUEST} /tags(?.| .)

    RewriteCond %{REQUEST_URI} !/wp-gallery2.php$

    RewriteRule . /wp-gallery2.php?g2_view=tags.TagCloud [QSA,L]

    RewriteCond %{THE_REQUEST} /admin/(?.| .)

    RewriteCond %{REQUEST_URI} !/wp-gallery2.php$

    RewriteRule . /wp-gallery2.php?g2_view=core.SiteAdmin [QSA,L]

    RewriteCond %{THE_REQUEST} /comments/add/([0-9]+).html(?.| .)

    RewriteCond %{REQUEST_URI} !/wp-gallery2.php$

    RewriteRule . /wp-gallery2.php?g2_view=comment.AddComment&g2_itemId=%1 [QSA,L]

    RewriteCond %{THE_REQUEST} /comments/([0-9]+).html(?.| .)

    RewriteCond %{REQUEST_URI} !/wp-gallery2.php$

    RewriteRule . /wp-gallery2.php?g2_view=comment.ShowAllComments&g2_itemId=%1 [QSA,L]

    RewriteCond %{THE_REQUEST} /([^?]+)/slideshow.html(?.| .)

    RewriteCond %{REQUEST_URI} !/wp-gallery2.php$

    RewriteRule . /wp-gallery2.php?g2_view=slideshow.Slideshow&g2_path=%1 [QSA,L]

    RewriteCond %{THE_REQUEST} /photo/([^?]+)(?.| .)

    RewriteCond %{REQUEST_URI} !/wp-gallery2.php$

    RewriteRule . /wp-gallery2.php?g2_path=%1 [QSA,L]

    RewriteCond %{THE_REQUEST} /([^?/]+)(?.| .)

    RewriteCond %{REQUEST_URI} !/wp-gallery2.php$

    RewriteRule . /wp-gallery2.php?g2_view=tags.VirtualAlbum&g2_tagName=%1 [QSA,L]

    RewriteCond %{THE_REQUEST} /([^?]+)(?.| .)

    RewriteCond %{REQUEST_URI} !/wp-gallery2.php$

    RewriteRule . /wp-gallery2.php?g2_controller=permalinks.Redirect&g2_filename=%1 [QSA,L]

    </IfModule>

    # END Url Rewrite section

    #

    RewriteEngine on

    RewriteCond %{HTTP_HOST} ^domain.com$ [NC]

    RewriteRule .* http://www.domain.com/ [L,R=301]

    RewriteCond %{THE_REQUEST} ?(ref=.*)? HTTP [NC]

    RewriteRule .? http://www.domain.com%{REQUEST_URI}? [R=301,L]

    RewriteCond %{THE_REQUEST} ?(referer=.*)? HTTP [NC]

    RewriteRule .? http://www.domain.com%{REQUEST_URI}? [R=301,L]

    Redirect /x/ http://www.domain.com/y/

    Redirect /a/ http://www.domain.com/b/

    and this is bbpress .htaccess located on /forum folder, and my bbpress is also located on /forum. And I dont call wordpress from bbpress and I dont call bbpress from wordpress. I use integration method expressed in faq section of bbpress documents. And my setup was working before I moved to the new vps.

    <ifmodule mod_rewrite.c>

    RewriteEngine On

    RewriteBase /forum/

    RewriteRule ^forum/([0-9]+)/page/([0-9]+)$ /forum/forum.php?id=$1&page=$2 [L,QSA]

    RewriteRule ^forum/([0-9]+)$ /forum/forum.php?id=$1 [L,QSA]

    RewriteRule ^topic/([0-9]+)/page/([0-9]+)$ /forum/topic.php?id=$1&page=$2 [L,QSA]

    RewriteRule ^topic/([0-9]+)$ /forum/topic.php?id=$1 [L,QSA]

    RewriteRule ^tags/(.+)/page/([0-9]+)$ /forum/tags.php?tag=$1&page=$2 [L,QSA]

    RewriteRule ^tags/(.+)/?$ /forum/tags.php?tag=$1 [L,QSA]

    RewriteRule ^tags/?$ /forum/tags.php [L,QSA]

    RewriteRule ^profile/([0-9]+)/page/([0-9]+)$ /forum/profile.php?id=$1&page=$2 [L,QSA]

    RewriteRule ^profile/([0-9]+)/([a-z]+)$ /forum/profile.php?id=$1&tab=$2 [L,QSA]

    RewriteRule ^profile/([0-9]+)/([a-z]+)/page/([0-9]+)$ /forum/profile.php?id=$1&tab=$2&page=$3 [L,QSA]

    RewriteRule ^profile/([0-9]+)$ /forum/profile.php?id=$1 [L,QSA]

    RewriteRule ^view/([a-z-]+)/page/([0-9]+)$ /forum/view.php?view=$1&page=$2 [L,QSA]

    RewriteRule ^view/([a-z-]+)$ /forum/view.php?view=$1 [L,QSA]

    RewriteRule ^rss/$ /forum/rss.php [L,QSA]

    RewriteRule ^rss/forum/([0-9]+)$ /forum/rss.php?forum=$1 [L,QSA]

    RewriteRule ^rss/topic/([0-9]+)$ /forum/rss.php?topic=$1 [L,QSA]

    RewriteRule ^rss/tags/([a-z]+)$ /forum/rss.php?tag=$1 [L,QSA]

    RewriteRule ^rss/profile/([0-9]+)$ /forum/rss.php?profile=$1 [L,QSA]

    </ifmodule>


    serimu
    Member

    @serimu

    I had godaddy hosting when I was setting up this forum. And it did not worked for permalinks. I moved to another shared hosting, and it worked. Now my website gets more traffic and I moved to a vps. But although I can change every setting on my vps, I dont know what to do. And technical stuff also did not know anything about the problem.

    I used mod_rewrite rules in my previous hosting, and I use it for now, but it does not work. Forum is opening, but links are not working.

    On godaddy, the mod_rewrite was also working for wordpress, and it also works for my vps. I think bbpress has some problem with those rewrite rules. Do I have to move back to shared hosting, which I dont want to do so, after I saw how fast my website is on a vps.


    serimu
    Member

    @serimu

    _ck_ thanks for your reply,

    I contacted to technical service, and they said they opened multiview option. But it did not work. And they gave me virtual host configuration:

    The error I saw is, ” page not found error”

    I use wordpress in my root directory, and I use bbpress in subfolder named as forum. I think wordpress’ .htaccess file do not interfere with the one for forums.

    I also asked for httpd.conf settings, but the technical stuff said, directadmin uses very clean httpd.conf settings, and their virtual host setup is nearly the same thing, so they gave virtual host settings:

    <Directory /home/abc.com/public>

    Options +Includes -Indexes +MultiViews

    </Directory>

    Technical stuff also, did not figure out why this problem occurs. And he also said multiviews option could reason some security problems.

    Hi,

    I just checked this subject again, and I want to say my solution:

    I moved my site to another hosting provider.

    Thanks, I wrote it to so1o’s forum.

    In reply to: Tags spam

    Thanks a lot.

    wordpress is installed on example.com

    bbpress is installed on example.com/forum/

    bbpress .htaccess file is located on example.com/forum/ namely example.com/forum/.htaccess .

    wordpress .htaccess file is located on root, namely example.com/.htaccess.

    And I just finished the design of bbpress to match my wordpress theme. And I closed permalink options as I conclude that it is not working with Godaddy (It is working only partially which has no meaning). I am totally confused, why forum links are ok and why others are not.

    I can send config.php, and .htaccess file if somebody things that it is because of an error in those files. I can also give a link to the website.

    I checked it again, and it is partially working. Forum links are accessible, but topic and others are not. I again tried three combination

    1) just adding multipleviews to htaccess = not working

    2) adding this solution = not working

    # BEGIN BBPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /forum/
    Options +MultiViews
    </IfModule>
    # END BBPress

    3. adding the code generated by rewrite-rules.php. = partially working

    +1

    I did also all the things(at least three or more times, and even I create a mirror template for bbpress to match with my wordpress template when I was tired of trying the same things to make permalinks to work),. So, for those people who uses Godaddy;

    It is not working with Godaddy. (Correction: It works for me, read below)

    But it only took a couple of hours to update my wordpress, install and integrate bbpress with wordpress (even, partially, templates). For now, I will not move to another hosting company for permalink option. But it is a bit annoying because rewrite rules are working on Godaddy. I have installed wordpress(10 or more different websites), and drupal(3 or more websites), and no problem with permalinks. When you create your htaccess file for the first time, you need to wait for a couple of hours (in avarage 2-3 hours). After that first initialization, every change in htaccess are applied instantly. Namely you just need to wait only for the first time.

    I also tried a simple redirect to check my htaccess file in forum root directory. And it was working.

    So as the creator team of bbpress is the same for wordpress. And as wordpress is ok with godaddy. The team may suggest an alternative way for rewrite rules. I dont know much about rewrite rules. And I believe the file (bb-admin/rewrite-rules. php) creates correct rules for the most of the servers.

    SOLUTION:

    I wrote all the above information and then I think to add my config.php file to here. So I find out something, that I dont use akismet, so I add // to beginning of that line, namely:

    //$bb->akismet_key = ''; // Example: '0123456789ab'

    and it is working now :)

Viewing 10 replies - 1 through 10 (of 10 total)