Announcement

Collapse
No announcement yet.

Apache redirection

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
    alfreema
    Senior Member

  • alfreema
    replied
    Originally posted by Wayne Luke View Post
    With the amount of time this has taken to resolve the redirect, it would have been easier just to put a search module on a custom page to show results from node 14 and then set it as the home page.
    That's a great answer and he'd probably be open to that if you explained how to do it.

    Originally posted by Wayne Luke View Post
    Otherwise, vBulletin simply isn't designed to be just a single channel forum. It never was. Workarounds with redirects may have been easier in the past because routing was pretty basic and didn't deviate.
    I get it. If I was in support I wouldn't touch it with a 10 foot pole either.

    This is a pretty basic redirect and Apache can easily handle it -- something perfect for the community to chime in on on this forum IMHO. If /forum533$ was screwing with the router, I would expect Apache to throw an error. I don't think having a subdirectory matters in this instance, because the RewriteRule should be preempting the index.php logic. Why don't you see if your search module idea will satisfy though -- I doubt he realizes the application will do what he wants without reconfiguring the web server.

    Leave a comment:

  • Wayne Luke
    vBulletin Technical Support Lead

  • Wayne Luke
    replied
    No, the rewrite rules in the .htaccess have to work for vBulletin to function. Otherwise, t

    What he is trying to do is redirect a folder to another location but once you're already in the folder and the web server has already processed things. It would be trying to redirect /forum533/forum533 since the redirect is already in the forum533 folder. At least that is what the image in post #9 is telling me.

    With the amount of time this has taken to resolve the redirect, it would have been easier just to put a search module on a custom page to show results from node 14 and then set it as the home page. Switching to have the "Latest Activity" tab as the default would have the same effect. Otherwise, vBulletin simply isn't designed to be just a single channel forum. It never was. Workarounds with redirects may have been easier in the past because routing was pretty basic and didn't deviate.

    Leave a comment:

  • alfreema
    Senior Member

  • alfreema
    replied
    Would his site work without .htaccess being in the primary folder? The default vBulletin redirects are inside an <IfModule mod_rewrite.c>, so I would think it's already enabled or his site wouldn't work? Unless there is some magic inside the index.php that can handle redirects without the .htaccess?

    Leave a comment:

  • Wayne Luke
    vBulletin Technical Support Lead

  • Wayne Luke
    replied
    That is a very old version of Apache. You can find out the instructions for enabling mod_rewrite in that version on the Apache website: https://httpd.apache.org/docs/2.2/rewrite/.

    Leave a comment:


  • user918
    replied
    Regarding the PHP customization.
    I would like to do without the PHP customization.

    The htaccess file is on my server as in #10 as. htaccess file, only here in the forum to upload the file.
    I have the impression that the. htaccess is not "processed" by Apache!
    Then I ran some tests with other parameters:

    Code:
    #RewriteRule "^/forum533$" "/forum533/node/14"
    #RewriteRule "/forum533$" "/forum533/node/14"
    #RewriteRule "http://test.seite.de/forum533/$" "http://test.seite.de/forum533/node/14"
    #RewriteRule "^http://test.seite.de/forum533/$" "http://test.seite.de/forum533/node/14" 
    #RewriteRule "^http://test.seite.de/forum533/$" "http://test.seite.de/forum533/node/14" [NC,L]
    #RewriteRule "^forum533/$" "forum533/node/14" [NC,L]
    #RewriteRule ^forum533/$ forum533/node/14 [NC,L]
    RewriteRule ^forum533/$ forum533/node/14
    Unfortunately without visible result, in the logs was also not logged!

    The rights in the forum directory are as follows:

    Code:
    /var/www/seite_de/html/forum533$ ls -lhta
    insgesamt 428K
    drwxr-xr-x 11 www-data www-data  12K Dez 14 08:20 .
    -rw-r--r--  1 www-data www-data 3,9K Dez 14 08:19 .htaccess
    drwxr-xr-x 58 www-data www-data  12K Dez 13 11:04 ..
    -rwxr-xr-x  1 www-data www-data 3,1K Dez  8 07:50 index.php
    -rwxr-xr-x  1 www-data www-data 2,2K Nov  8 10:53 favicon.ico
    -rwxr-xr-x  1 www-data www-data 3,1K Nov  8 07:39 config.php
    drwxr-xr-x  8 www-data www-data 4,0K Nov  6 11:29 .git
    -rw-r--r--  1 www-data www-data    0 Nov  6 08:13 vbdebuglog.log
    drwxr-xr-x 18 www-data www-data 4,0K Nov  6 08:13 core
    drwxr-xr-x  7 www-data www-data 4,0K Nov  6 08:06 images
    drwxr-xr-x  8 www-data www-data  12K Nov  6 08:06 js
    -rwxr-xr-x  1 www-data www-data 3,1K Okt 19 08:11 config.php.bkp
    -rwxr-xr-x  1 www-data www-data 3,5K Okt 19 08:11 htaccess.txt
    -rw-r--r--  1 www-data www-data  29K Okt 19 08:11 LICENSE
    -rwxr-xr-x  1 www-data www-data 1,1K Okt 19 08:11 vb_favicon.ico
    -rwxr-xr-x  1 www-data www-data 1,7K Okt 19 08:11 web.config
    drwxr-xr-x  4 www-data www-data 4,0K Feb  7  2017 css
    -rw-r--r--  1 www-data www-data 290K Feb  7  2017 forumvb5.css
    drwxr-xr-x  4 www-data www-data 4,0K Sep  8  2016 includes
    drwxr-xr-x  2 www-data www-data 4,0K Feb 24  2016 forumrunner
    drwxr-xr-x 16 www-data www-data 4,0K Feb 24  2016 fonts
    drwxr-xr-x  4 www-data www-data 4,0K Feb 24  2016 admincp
    I extended the rights of htaccess file to:
    Code:
    -rwxrwxrwx  1 www-data www-data 3,9K Dez 14 08:19 .htaccess
    Nothing else has changed.

    We're using Apache version:
    Code:
    apache2 -v
    Server version: Apache/2.2.22 (Debian)
    Server built:   Jun 25 2017 20:33:16

    Leave a comment:

  • alfreema
    Senior Member

  • alfreema
    replied
    Originally posted by user918 View Post
    @alfreema
    No, no error message as if the statement in the htaccess file was ignored or executed.

    What I want to achieve is the forwarding of http://test.die_seite.de/forum533 to http://test.die_seite.de/forum533/node/14
    It doesn't have to be a htaccess feed, maybe someone has an idea how I can do it with PHP redirection.
    PHP forwarding, it can be a virtual forwarding.
    The somewhat complicated approach is that the entire forum is located in channel 14 (node ID 14) and with the first call http://test.die_seite.de/forum533/ the node ID 2 is called.
    That's my problem.
    That should be doable with Apache and you should not need PHP at all.

    The last attachment you sent was of htaccess.txt. That file is unused and only serves as a backup of the live one, which is .htaccess. The edits you make HAVE to be in .htaccess. Can you verify that you made the changes I recommended in .htaccess?

    As long as your redirect match string ends with $, it means the url will contain no more characters at all after the last character right before the $. So this rule:

    RewriteRule "^/forum533$" "/forum533/node/14"

    Means the URL path must begin (^) with /forum533, and it must end ($) with /forum533

    e.g.

    Testing with this should show the behavior you want:

    http://www.seite.de/forum533

    But testing with this would NOT work with the behavior you want:

    http://www.seite.de/forum533/

    Leave a comment:

  • Mark.B
    vBulletin Support

  • Mark.B
    replied
    As Wayne has mentioned, the software simply isn't designed to do this, and it's outside the scope of the support we can provide. Even if you got it working there is no telling what else it might break given that vB5 relies entirely on redirects to function.

    Leave a comment:


  • user918
    replied
    @alfreema
    No, no error message as if the statement in the htaccess file was ignored or executed.

    wayne
    New Member
    wayne Luke
    Still not really sure what you're trying to accomplish here.
    What I want to achieve is the forwarding of http://test.die_seite.de/forum533 to http://test.die_seite.de/forum533/node/14
    It doesn't have to be a htaccess feed, maybe someone has an idea how I can do it with PHP redirection.
    PHP forwarding, it can be a virtual forwarding.
    The somewhat complicated approach is that the entire forum is located in channel 14 (node ID 14) and with the first call http://test.die_seite.de/forum533/ the node ID 2 is called.
    That's my problem.
    Attached Files

    Leave a comment:

  • Wayne Luke
    vBulletin Technical Support Lead

  • Wayne Luke
    replied
    If you're trying to redirect var/www/seite_de/html/forum533 where you have vBulletin installed, the redirect would have to be at the level about it. Still not really sure what you're trying to accomplish here. It is definitely outside the scope of the designed use case for the software to do redirects like this.

    Leave a comment:

  • alfreema
    Senior Member

  • alfreema
    replied
    Originally posted by user918 View Post
    Wayne Luke
    vBulletin Technical Support Lead
    Wayne Luke unfortunately, I didn't hear you.
    Do you mean to create another directory in the fourm533 directory, like on the attachment picture?

    I made the adjustment, which
    alfreema
    Senior Member
    alfreema suggested, but unfortunately without result, when calling test.seite.de/forum533 I won't go on test.seite.de/forum533/node/14.



    Is it the index.php on the top level?
    What result did you get? Did it give you an error? Did it redirect somewhere unexpected? What URL do you end up on when put in test.seite.de/forum533 ?

    Leave a comment:


  • user918
    replied
    The directory should be empty. Just like the AdminCP directory. The only purpose would be to handle redirects.
    Wayne Luke
    vBulletin Technical Support Lead
    Wayne Luke unfortunately, I didn't hear you.
    Do you mean to create another directory in the fourm533 directory, like on the attachment picture?

    I made the adjustment, which
    alfreema
    Senior Member
    alfreema suggested, but unfortunately without result, when calling test.seite.de/forum533 I won't go on test.seite.de/forum533/node/14.


    vBulletin 5 does everything virtually. Every single URL will ultimately be redirected to index.php even access to the AdminCP.
    Is it the index.php on the top level?
    Attached Files

    Leave a comment:

  • alfreema
    Senior Member

  • alfreema
    replied
    Originally posted by user918 View Post
    Well, I made the adjustment, you can see it in the attachment file.
    Unfortunately without result, nothing is happening.

    wayne
    New Member
    wayne Luke
    What do you mean new directory?
    What should the structure look like?

    Directory structure now:
    /var/www/die_seite/forum533/_vb533_Forum_

    Another thing with /forumum533 I have committed myself, it should be called forum533.
    1) First off, your rule is commented out ... remove the # at the beginning of the line it or will never fire.


    2) Change ...
    # RewriteRule ^(forumum533/)$ http://test.die_seite.de/forum533/node/14 # does not work.

    To ...

    RewriteRule "^/forum533$" "/forum533/node/14"

    3) Do what
    Wayne Luke
    vBulletin Technical Support Lead
    Wayne Luke said and move it above the "Main Redirects".

    e.g.

    Code:
       . . .
    
        # Redirect old install path to core.
        RewriteRule ^install/ core/install/ [NC,L]
    
    
        # My adaptation
        RewriteRule "^/forum533$" "/forum533/node/14"
    
    
        # Main Redirect
        RewriteCond %{REQUEST_URI} !\.(gif|jpg|jpeg|png|css)$
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ index.php?routestring=$1 [L,QSA]
    
        . . .
    4) Then test with this exact url:

    http://test.die_seite.de/forum533

    Then report back here with the result. Once you have that working, we should be able to get whatever it is you really want to happen to work.
    alfreema
    Senior Member
    Last edited by alfreema; Mon 11 Dec '17, 5:48am.

    Leave a comment:

  • Wayne Luke
    vBulletin Technical Support Lead

  • Wayne Luke
    replied
    The directory should be empty. Just like the AdminCP directory. The only purpose would be to handle redirects.

    vBulletin 5 does everything virtually. Every single URL will ultimately be redirected to index.php even access to the AdminCP. We provide an empty AdminCP directory because some people use .htaccess to block access, even though that is built into the software now. Once a URL gets to index.php, the system looks at it and determines where it should go based on a routing class. It then loads the appropriate page via the index.php script.

    As for my suggestion, it was more of a "Hope this works" than "This will solve the problem" guess. Your use case is not something the software is designed for. We didn't design it so a channel URL can be redirected to a topic URL. You might need to consult an Apache specialist who knows more about mod_rewrite directives. Configurations of this sort fall outside of standard technical support provided by us. What I know about mod_rewrite and Apache is from using Google to try and solve issues like your own.

    Leave a comment:


  • user918
    replied
    Well, I made the adjustment, you can see it in the attachment file.
    Unfortunately without result, nothing is happening.

    wayne
    New Member
    wayne Luke
    What do you mean new directory?
    What should the structure look like?

    Directory structure now:
    /var/www/die_seite/forum533/_vb533_Forum_

    Another thing with /forumum533 I have committed myself, it should be called forum533.
    Attached Files

    Leave a comment:

  • Wayne Luke
    vBulletin Technical Support Lead

  • Wayne Luke
    commented on 's reply
    If that doesn't work, you'll need to create an actual /forumum533 directory

Related Topics

Collapse

Working...
X