Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

.htaccess help

edited February 2012 in Vanilla 2.0 - 2.8

i have a .htaccess file ,

Original

If you modify this file then change the above line to: # Modified


RewriteEngine On
# Certain hosts may require the following line.
# If vanilla is in a subfolder then you need to specify it after the /.
# (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum)
# RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]

//Custom 401 errors
ErrorDocument 401 http://snowblazers.tk/vanilla/index.php?p=/dashboard/home/permission

//Custom 404 errors
ErrorDocument 404 http://snowblazers.tk/vanilla/index.php?p=/dashboard/home/filenotfound

It just goes to my main 404 page when going to /vanilla/ now

Best Answer

  • Options
    x00x00 MVP
    Answer ✓

    emery said:
    i have a .htaccess file ,

    # Original
    # If you modify this file then change the above line to: # Modified
    <IfModule mod_rewrite.c>
       RewriteEngine On
       # Certain hosts may require the following line.
       # If vanilla is in a subfolder then you need to specify it after the /. 
       # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum)
       # RewriteBase /
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]
    </IfModule>
    //Custom 401 errors
    ErrorDocument 401 http://snowblazers.tk/vanilla/index.php?p=/dashboard/home/permission
    
    //Custom 404 errors
    ErrorDocument 404 http://snowblazers.tk/vanilla/index.php?p=/dashboard/home/filenotfound
    

    It just goes to my main 404 page when going to /vanilla/ now

    // is not a valid comment

    grep is your friend.

Answers

  • Options
    x00x00 MVP
    Answer ✓

    emery said:
    i have a .htaccess file ,

    # Original
    # If you modify this file then change the above line to: # Modified
    <IfModule mod_rewrite.c>
       RewriteEngine On
       # Certain hosts may require the following line.
       # If vanilla is in a subfolder then you need to specify it after the /. 
       # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum)
       # RewriteBase /
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]
    </IfModule>
    //Custom 401 errors
    ErrorDocument 401 http://snowblazers.tk/vanilla/index.php?p=/dashboard/home/permission
    
    //Custom 404 errors
    ErrorDocument 404 http://snowblazers.tk/vanilla/index.php?p=/dashboard/home/filenotfound
    

    It just goes to my main 404 page when going to /vanilla/ now

    // is not a valid comment

    grep is your friend.

  • Options
    x00x00 MVP
    edited February 2012

    you can copy dashboard/views/error.master.php, to your themes' views folder?

    then you can edit it.

    You know you can set the text of the default permission/error pages, through that and locale, style with css.

    try

     ErrorDocument 404 /dashboard/home/filenotfound
     ErrorDocument 401 /dashboard/home/permission
    

    note you can set in config

    $Configuration['Routes']['Default404'] = array('dashboard/home/filenotfound', , 'NotFound');
    $Configuration['Routes']['DefaultPermission'] = array('dashboard/home/permission', 'NotAuthorized');
    

    grep is your friend.

  • Options

    so long as you haven't replaces this with a physical file you can set

    $Definition['ErrorPermission'] = 'Sorry, permission denied.';
    

    in your locale.

    and in config

    $Configuration['Garden']['Errors']['MasterView']  = 'error.master.php'; 
    

    For a different error page.

    grep is your friend.

  • Options

    Thank you

Sign In or Register to comment.