1. 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?

Discussion in 'XenForo Questions and Support' started by Wuebit, Feb 25, 2011.

  1. Wuebit

    Wuebit Well-Known Member

    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
     
  2. Brett Peters

    Brett Peters Well-Known Member

    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>
     
  3. Wuebit

    Wuebit Well-Known Member

    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
     
  4. Brett Peters

    Brett Peters Well-Known Member

    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
     
  5. Wuebit

    Wuebit Well-Known Member

    It is in the same place mate :)
     
  6. Brett Peters

    Brett Peters Well-Known Member

    Then the only thing that I could sugest is that you post an example of your rewrite so someone can confirm that it is correct
     
  7. Wuebit

    Wuebit Well-Known Member

    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]
     
  8. Brett Peters

    Brett Peters Well-Known Member

    Try​
    Code:
    RewriteRule ^blogs/$ /tutorials [NC]
    Or something like this
     
    Vodkaholic likes this.
  9. Wuebit

    Wuebit Well-Known Member

    Yea that don't work also not sure if am adding it in the right place tho

    nice site also thank's for that
     
  10. Wuebit

    Wuebit Well-Known Member

    not sure if xenforo is stopping the re-write's working or not *bump* any idea's anyone?
    Thanks
     

Share This Page