OrangeScrum .htaccess to OLS

edited July 11 in Web Server
This is how I converted OrangeScrum .httaccess to OLS. This is OLS v1.6 and OrangeScrum v1.6.1. Any help getting this website to work is appreciated.

OrangeScrum has the following .htaccess files:
  • ./.htaccess
  • ./lib/Cake/Console/Templates/skel/.htaccess
  • ./lib/Cake/Console/Templates/skel/webroot/.htaccess
  • ./app/.htaccess
  • ./app/webroot/.htaccess
  • ./app/webroot/files/case_files/.htaccess
Orginal ./.htaccess
<IfModule mod_rewrite.c>                                                                                                                                              
   RewriteEngine on                                                                                                                                                   
   RewriteRule    ^$ app/webroot/    [L]                                                                                                                              
   RewriteRule    (.*) app/webroot/$1 [L]                                                                                                                             
</IfModule>
Static Context
context / {
  location                $DOC_ROOT
  allowBrowse             1

  rewrite  {
    enable                1
RewriteRule    ^$ app/webroot/    [L]
 RewriteRule    (.*) app/webroot/$1 [L]
  }
  addDefaultCharset       off

}
Orginal ./lib/Cake/Console/Templates/skel/.htaccess
<IfModule mod_rewrite.c>                                                                                                                                              
    RewriteEngine on                                                                                                                                                  
    RewriteRule    ^$    webroot/    [L]                                                                                                                              
    RewriteRule    (.*) webroot/$1    [L]                                                                                                                             
</IfModule> 
Static Context
context /lib/Cake/Console/Templates/skel/ {
  location                $DOC_ROOT/lib/Cake/Console/Templates/skel/
  allowBrowse             1

  rewrite  {
    enable                1
RewriteRule    ^$    webroot/    [L]
RewriteRule    (.*) webroot/$1    [L]

  }
  addDefaultCharset       off
}
Orginal ./lib/Cake/Console/Templates/skel/webroot/.htaccess
<IfModule mod_rewrite.c>                                                                                                                                              
    RewriteEngine On                                                                                                                                                  
    RewriteCond %{REQUEST_FILENAME} !-d                                                                                                                               
    RewriteCond %{REQUEST_FILENAME} !-f                                                                                                                               
    RewriteRule ^ index.php [L]                                                                                                                                       
</IfModule>
Static Context
context /lib/Cake/Console/Templates/skel/webroot/ {
  location                $DOC_ROOT/lib/Cake/Console/Templates/skel/webroot
  allowBrowse             1

  rewrite  {
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

  }
  addDefaultCharset       off
}

Orginal ./app/.htaccess
<IfModule mod_rewrite.c>                                                                                                                                              
    RewriteEngine on                                                                                                                                                  
    RewriteRule    ^$    webroot/    [L]                                                                                                                              
    RewriteRule    (.*) webroot/$1    [L]                                                                                                                             
                                                                                                                                                                      
                                                                                                                                                                      
        # Insert filter                                                                                                                                               
        SetOutputFilter DEFLATE                                                                                                                                       
                                                                                                                                                                      
        # Netscape 4.x has some problems...                                                                                                                           
        BrowserMatch ^Mozilla/4 gzip-only-text/html                                                                                                                   
                                                                                                                                                                      
        # Netscape 4.06-4.08 have some more problems                                                                                                                  
        BrowserMatch ^Mozilla/4\.0[678] no-gzip                                                                                                                       
                                                                                                                                                                      
        # MSIE masquerades as Netscape, but it is fine                                                                                                                
        # BrowserMatch \bMSIE !no-gzip !gzip-only-text/html                                                                                                           
                                                                                                                                                                      
        # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48                                                                                                      
        # the above regex won't work. You can use the following                                                                                                       
        # workaround to get the desired effect:                                                                                                                       
        BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html                                                                                                           
                                                                                                                                                                      
        # Don't compress images                                                                                                                                       
        SetEnvIfNoCase Request_URI \                                                                                                                                  
        \.(?:gif|jpe?g|png)$ no-gzip dont-vary                                                                                                                        
                                                                                                                                                                      
        # Make sure proxies don't deliver the wrong content                                                                                                           
        Header append Vary User-Agent env=!dont-vary                                                                                                                  
</IfModule>                                                                                                                                                           
                                                                                                                                                                      
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf|txt|html|x-html|php|css|xml|js|woff|ttf|svg|eot)(\.gz)?$">                                                    
    <IfModule mod_expires.c>                                                                                                                                          
        ExpiresActive On                                                                                                                                              
</IfModule>                                                                                                                                                       
    <IfModule mod_headers.c>                                                                                                                                          
        Header set Expires "access 12 month"                                                                                                                          
        Header unset ETag                                                                                                                                             
    </IfModule>                                                                                                                                                       
    FileETag None                                                                                                                                                     
</FilesMatch>  

Static Context - Could not figure this one out. This is my best guess.
context /app/ {
  location                $DOC_ROOT/app
  allowBrowse             1
  enableExpires           1
  expiresDefault          A31557600
  extraHeaders            Vary: User-Agent

  rewrite  {
    enable                1
RewriteRule    ^$    webroot/    [L]
RewriteRule    (.*) webroot/$1    [L]
  }
  addDefaultCharset       off
}
Orginal ./app/webroot/.htaccess
<IfModule mod_rewrite.c>                                                                                                                                              
    RewriteEngine On                                                                                                                                                  
    RewriteCond %{REQUEST_FILENAME} !-d                                                                                                                               
    RewriteCond %{REQUEST_FILENAME} !-f                                                                                                                               
    RewriteRule ^(.*)$ index.php [QSA,L]                                                                                                                              
</IfModule>
Static Context
context /app/webroot/ {
  location                $DOC_ROOT/app/webroot
  allowBrowse             1

  rewrite  {
    enable                1
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]

  }
  addDefaultCharset       off
}

Orginal ./app/webroot/files/case_files/.htaccess
#Order Deny,Allow                                                                                                                                                     
#Deny from all 
Static Context
This can be bypassed.
Sign In or Register to comment.
Support CyberPanel CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!