XF 1.5 Redirect Help Please

I don't think those redirection scripts actually include forum.php hence there is nothing there to redirect. The author of those may be able to answer why.

That said, I think you would just need to handle this with a line or two in a .htaccess file, in your web root:

Code:
RewriteEngine On

RewriteRule ^classicmopar/forum\.php$ /classicmopar/ [R=301,L]
 
I don't think those redirection scripts actually include forum.php hence there is nothing there to redirect. The author of those may be able to answer why.

That said, I think you would just need to handle this with a line or two in a .htaccess file, in your web root:

Code:
RewriteEngine On

RewriteRule ^classicmopar/forum\.php$ /classicmopar/ [R=301,L]

eh, didn't work Chris
 
Thanks @Brogan

This is in the site root:

Code:
RewriteEngine on

RewriteOptions inherit

RewriteCond %{HTTP_HOST} ^forfmjbodiesonly\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.forfmjbodiesonly\.com$
RewriteRule ^/?$ "http\:\/\/www\.forfmjbodiesonly\.com\/classicmopar\/" [R=301,L]

This is in the forum root

Code:
#    Mod_security can interfere with uploading of content such as attachments. If you
#    cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
#    SecFilterEngine Off
#    SecFilterScanPOST Off
#</IfModule>

ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 405 default
ErrorDocument 406 default
ErrorDocument 500 default
ErrorDocument 501 default
ErrorDocument 503 default

<IfModule mod_rewrite.c>
    RewriteEngine On

    #    If you are having problems with the rewrite rules, remove the "#" from the
    #    line that begins "RewriteBase" below. You will also have to change the path
    #    of the rewrite to reflect the path to your XenForo installation.
    #RewriteBase /xenforo

    #    This line may be needed to enable WebDAV editing with PHP as a CGI.
    #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
</IfModule>
 
As it's in your XF directory, you can probably just add something like this to the XF .htaccess:
Code:
RewriteRule ^forum.php /classicmopar/ [R=301,L]
 
Put that line below </IfModule> int he htaccess file in your forum folder


I did. Ill do it again right now.


Edit -- done. Here is the htaccess


[
Code:
#    Mod_security can interfere with uploading of content such as attachments. If you
#    cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
#    SecFilterEngine Off
#    SecFilterScanPOST Off
#</IfModule>

ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 405 default
ErrorDocument 406 default
ErrorDocument 500 default
ErrorDocument 501 default
ErrorDocument 503 default

<IfModule mod_rewrite.c>
    RewriteEngine On

    #    If you are having problems with the rewrite rules, remove the "#" from the
    #    line that begins "RewriteBase" below. You will also have to change the path
    #    of the rewrite to reflect the path to your XenForo installation.
    #RewriteBase /xenforo

    #    This line may be needed to enable WebDAV editing with PHP as a CGI.
    #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
</IfModule>


Redirect 301 /forum.php http://www.forfmjbodiesonly.com/classicmopar/
 
Honestly I'm pretty sure one of the above should have worked so there may be some other factor at play.

This will work though.

Create a file named forum.php and upload it to the relevant location. That file should contain:
PHP:
<?php

header('HTTP/1.1 301 Moved Permanently');
header('Location: http://www.forfmjbodiesonly.com/classicmopar');
exit;

?>
 
Top Bottom