Advertisement
Guest User

Untitled

a guest
Jul 5th, 2013
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.65 KB | None | 0 0
  1. # Multiple Environment config, set this to development, staging or production
  2. # SetEnv FUEL_ENV production
  3.  
  4. <IfModule mod_rewrite.c>
  5.  
  6.     # Make sure directory listing is disabled
  7.     Options +SymLinksIfOwnerMatch -Indexes
  8.     RewriteEngine on
  9.  
  10.     # NOTICE: If you get a 404 play with combinations of the following commented out lines
  11.     #AllowOverride All
  12.     #RewriteBase /wherever/fuel/is
  13.  
  14.     # Restrict your site to only one domain
  15.     # !important USE ONLY ONE OPTION
  16.  
  17.     # Option 1: To rewrite "www.domain.com -> domain.com" uncomment the following lines.
  18.     #RewriteCond %{HTTPS} !=on
  19.     #RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
  20.     #RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
  21.  
  22.     # Option 2: To rewrite "domain.com -> www.domain.com" uncomment the following lines.
  23.     #RewriteCond %{HTTPS} !=on
  24.     #RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
  25.     #RewriteCond %{HTTP_HOST} (.+)$ [NC]
  26.     #RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L]
  27.  
  28.     # Remove index.php from URL
  29.     #RewriteCond %{HTTP:X-Requested-With}   !^XMLHttpRequest$
  30.     #RewriteCond %{THE_REQUEST}             ^[^/]*/index\.php [NC]
  31.     #RewriteRule ^index\.php(.*)$           $1 [R=301,NS,L]
  32.  
  33.     # Send request via index.php (again, not if its a real file or folder)
  34.     RewriteCond %{REQUEST_FILENAME} !-f
  35.     RewriteCond %{REQUEST_FILENAME} !-d
  36.  
  37.     # deal with php5-cgi first
  38.     <IfModule mod_fcgid.c>
  39.         RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
  40.     </IfModule>
  41.  
  42.     <IfModule !mod_fcgid.c>
  43.  
  44.         # for normal Apache installations
  45.         <IfModule mod_php5.c>
  46.             RewriteRule ^(.*)$ index.php?/$1 [L]
  47.         </IfModule>
  48.  
  49.         # for Apache FGCI installations
  50.         <IfModule !mod_php5.c>
  51.             RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
  52.         </IfModule>
  53.  
  54.     </IfModule>
  55.  
  56. </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement