XF 1.4 Redirects Clashing?

Charlie J

Active member
I own a domain and would like to have a Redirect which is mydomain.com/Vote however when the redirect goes to a page i setup it keeps saying "That page could not be found" because it keeps clashing with the xenforo thing, anyway i can change?
 
Unfortunately, as I don't know how that system is working, I can't really provide a great recommendation. XenForo uses a "catch all" redirect in .htaccess to handle friendly URLs. Assuming that their system is modifying .htaccess, the redirect would need to be moved up in the file before the default XenForo redirects.

Can you show us the contents of your .htaccess file? (Not htaccess.txt)
 
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 500 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>

RewriteCond %{HTTP_HOST} ^toxicnation\.net$ [OR]
RewriteCond %{HTTP_HOST} ^www\.toxicnation\.net$
RewriteRule ^Vote$ "http\:\/\/toxicnation\.net\/pages\/Vote\/" [R=301,L]

Sorry for late reply, there
 
Right, move the bottom 3 lines (which are what the redirect tool added) up so they're just below:
Code:
RewriteEngine On
 
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 500 default

<IfModule mod_rewrite.c>
RewriteEngine On

RewriteCond %{HTTP_HOST} ^toxicnation\.net$ [OR]
RewriteCond %{HTTP_HOST} ^www\.toxicnation\.net$
RewriteRule ^Vote$ "http\:\/\/toxicnation\.net\/pages\/Vote\/" [R=301,L]

# 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>
 
Also quick note, i tried the .htaccess file from @Brogan just now and Thanks that worked lol, i just want it to be disguised if possible so it displays from web bar as toxicnation.net/Vote rather than the toxicnation.net/pages/vote thing
 
Top Bottom