• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

If i am adding some CRR where do i?

DarkVodka

Formerly Wuebit
#1
Am trying to add some Custom Rewrite rule's but unsure where to add them in the .htaccess. Every i add them it just kill's all my forum link's


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>

<IfModule mod_rewrite.c>
    RewriteEngine On

RewriteCond %{HTTP_HOST} ^www\.animelon\.com
RewriteRule (.*) http://animelon.com/$1 [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

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data|js|styles|install) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
</IfModule>
Thank's
 

Brett Peters

Well-known member
#2
I added a redirect for non www
Dont know if this helps

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>

<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 /dev

    # Redirect if example.com (case-insensitive) to www.example.com
    RewriteCond %{HTTP_HOST} ^yoursite\.com [NC]
    RewriteRule (.*) http://www.yoursite.com/$1 [R=301,L]

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

DarkVodka

Formerly Wuebit
#3
Oh my question is not about that (it work's fine for me)
I want to know where to add custom Rewrite rule's for a xenforo addon

I thought it might be above this

Code:
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data|js|styles|install) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
But give's 404's when i add it
 

Brett Peters

Well-known member
#4
I would have thought that your edit would be added in the same place as mine
I posted my .htacess edit so you could get the location of my edit
 

DarkVodka

Formerly Wuebit
#7
well am only testing at the mo not very good with it. This is what i am testing with

Code:
RewriteRule blogs/(.*) /tutorials/$1 [NC]

or

RewriteRule blogs/(.*) tutorials/$1 [NC]

or

RewriteBase /
RewriteRule blogs/(.*) tutorials/$1 [NC]