Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Options +FollowSymLinks
- Options -Indexes
- RewriteEngine On
- RewriteOptions inherit
- RewriteBase /
- # Handles Non-SSL redirect to WWW
- RewriteCond %{HTTP_HOST} !^www\. [NC]
- RewriteCond %{HTTP_HOST} !footbridgemobile [NC]
- RewriteCond %{HTTP_HOST} !referralx [NC]
- RewriteCond %{HTTP_HOST} !^[\d]{1,3}\.[\d]{1,3}\. [NC]
- RewriteCond %{HTTP_HOST} !^localhost [NC]
- RewriteCond %{HTTPS} off
- RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
- # Handles SSL redirect to WWW
- RewriteCond %{HTTP_HOST} !^www\. [NC]
- RewriteCond %{HTTP_HOST} !footbridgemobile [NC]
- RewriteCond %{HTTP_HOST} !referralx [NC]
- RewriteCond %{HTTP:X-Forwarded-Proto} https [OR]
- RewriteCond %{HTTPS} on
- RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
- # Force SSL (uncomment to use)
- RewriteCond %{HTTP:X-Forwarded-Proto} !https
- RewriteCond %{HTTPS} off
- RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
- #####################################################################
- ####################### Land of Redirects ###########################
- #####################################################################
- RewriteCond %{REQUEST_URI} /pageName.php
- RewriteRule ^(.+)$ /toPageName.php [L,R=301]
- # Services
- RewriteCond %{REQUEST_URI} /Long-Island-remodeling/kitchen-remodel.php
- RewriteRule ^(.+)$ /home-remodeling/kitchen-remodeling.php [L,R=301]
- RewriteCond %{REQUEST_URI} /Long-Island-home-improvement/replacement-windows.php
- RewriteRule ^(.+)$ /long-island/replacement-windows.php [L,R=301]
- RewriteCond %{REQUEST_URI} /Long-Island-home-improvement/door-replacement.php
- RewriteRule ^(.+)$ /long-island/replacement-doors.php [L,R=301]
- RewriteCond %{REQUEST_URI} /Long-Island-home-improvement/porticos.php
- RewriteRule ^(.+)$ /long-island/porticos.php [L,R=301]
- RewriteCond %{REQUEST_URI} /Long-Island-home-improvement/concrete.php
- RewriteRule ^(.+)$ /long-island/masonry.php [L,R=301]
- RewriteCond %{REQUEST_URI} /Long-Island-home-improvement/driveways-patios.php
- RewriteRule ^(.+)$ /long-island/ [L,R=301]
- RewriteCond %{REQUEST_URI} /Long-Island-home-improvement/walkways-steps.php
- RewriteRule ^(.+)$ /long-island/stoops-railings.php [L,R=301]
- RewriteCond %{REQUEST_URI} /Long-Island-remodeling/bathroom-remodel.php
- RewriteRule ^(.+)$ /home-remodeling/bathroom-remodeling.php [L,R=301]
- RewriteCond %{REQUEST_URI} /Long-Island-home-improvement/vinyl-siding.php
- RewriteRule ^(.+)$ /long-island/vinyl-siding.php [L,R=301]
- RewriteCond %{REQUEST_URI} /Long-Island-home-improvement/fiber-cememt-siding.php
- RewriteRule ^(.+)$ /long-island/vinyl-siding.php [L,R=301]
- RewriteCond %{REQUEST_URI} /Long-Island-home-improvement/fencing.php
- RewriteRule ^(.+)$ /long-island/fencing.php [L,R=301]
- RewriteCond %{REQUEST_URI} /Long-Island-home-improvement/solar-panels.php
- RewriteRule ^(.+)$ /long-island/solar-panels.php [L,R=301]
- RewriteCond %{REQUEST_URI} /Long-Island-home-improvement/
- RewriteRule ^(.+)$ /home-remodeling/ [L,R=301]
- # City Pages
- RewriteCond %{REQUEST_URI} /NY/Amityville-remodeling.php
- RewriteRule ^(.+)$ /ny-remodel/amityville-remodeling-company.php [L,R=301]
- RewriteCond %{REQUEST_URI} /NY/Babylon-remodeling.php
- RewriteRule ^(.+)$ /ny-remodel/bathroom-remodeling-babylon.php [L,R=301]
- RewriteCond %{REQUEST_URI} /NY/Bay-Shore-remodeling.php
- RewriteRule ^(.+)$ /ny-remodel/bay-shore-bathroom-remodeling.php [L,R=301]
- RewriteCond %{REQUEST_URI} /NY/Bayside-remodeling.php
- RewriteRule ^(.+)$ /ny-remodel/bayside-remodeling.php [L,R=301]
- RewriteCond %{REQUEST_URI} /NY/Far-rockaway-remodeling.php
- RewriteRule ^(.+)$ /ny-remodel/far-rockaway-remodeling.php [L,R=301]
- RewriteCond %{REQUEST_URI} /NY/Flushing-remodeling.php
- RewriteRule ^(.+)$ /ny-remodel/flushing-remodeling.php [L,R=301]
- RewriteCond %{REQUEST_URI} /NY/Jamaica-remodeling.php
- RewriteRule ^(.+)$ /ny-remodel/jamaica-remodeling.php [L,R=301]
- RewriteCond %{REQUEST_URI} /NY/Little-Neck-remodeling.php
- RewriteRule ^(.+)$ /ny-remodel/little-neck-remodeling.php [L,R=301]
- RewriteCond %{REQUEST_URI} /NY/Queens-Village-remodeling.php
- RewriteRule ^(.+)$ /ny-remodel/queens-village-remodeling.php [L,R=301]
- RewriteCond %{REQUEST_URI} /NY/South-Ozone-Park-remodeling.php
- RewriteRule ^(.+)$ /ny-remodel/south-ozone-park-remodeling.php [L,R=301]
- RewriteCond %{REQUEST_URI} /NY/Springfield-Gardens-remodeling.php
- RewriteRule ^(.+)$ /ny-remodel/springfield-gardens-remodeling.php [L,R=301]
- RewriteCond %{REQUEST_URI} /NY/Suffolk-remodeling.php
- RewriteRule ^(.+)$ /ny-remodel/suffolk-remodeling-contractor.php [L,R=301]
- RewriteCond %{REQUEST_URI} /NY/Queens-remodeling.php
- RewriteRule ^(.+)$ /ny-remodel/queens-remodeling.php [L,R=301]
- RewriteCond %{REQUEST_URI} /NY/Brooklyn-remodeling.php
- RewriteRule ^(.+)$ /ny-remodel/remodeling-brooklyn.php [L,R=301]
- RewriteCond %{REQUEST_URI} /NY/
- RewriteRule ^(.+)$ /ny-remodel/ [L,R=301]
- ErrorDocument 404 /404.php
- <IfModule mod_deflate.c>
- # Compress HTML, CSS, JavaScript, Text, XML and fonts
- AddOutputFilterByType DEFLATE application/javascript
- AddOutputFilterByType DEFLATE application/rss+xml
- AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
- AddOutputFilterByType DEFLATE application/x-font
- AddOutputFilterByType DEFLATE application/x-font-opentype
- AddOutputFilterByType DEFLATE application/x-font-otf
- AddOutputFilterByType DEFLATE application/x-font-truetype
- AddOutputFilterByType DEFLATE application/x-font-ttf
- AddOutputFilterByType DEFLATE application/x-javascript
- AddOutputFilterByType DEFLATE application/xhtml+xml
- AddOutputFilterByType DEFLATE application/xml
- AddOutputFilterByType DEFLATE font/opentype
- AddOutputFilterByType DEFLATE font/otf
- AddOutputFilterByType DEFLATE font/ttf
- AddOutputFilterByType DEFLATE image/svg+xml
- AddOutputFilterByType DEFLATE image/x-icon
- AddOutputFilterByType DEFLATE text/css
- AddOutputFilterByType DEFLATE text/html
- AddOutputFilterByType DEFLATE text/javascript
- AddOutputFilterByType DEFLATE text/plain
- AddOutputFilterByType DEFLATE text/xml
- </IfModule>
- # Caching
- <IfModule mod_expires.c>
- ExpiresActive On
- ExpiresByType image/jpg "access 1 week"
- ExpiresByType image/jpeg "access 1 week"
- ExpiresByType image/gif "access 1 week"
- ExpiresByType image/png "access 1 week"
- ExpiresByType text/css "access 1 week"
- ExpiresByType text/html "access 1 week"
- ExpiresByType application/pdf "access 1 week"
- ExpiresByType text/x-javascript "access 1 week"
- ExpiresByType application/javascript "access plus 1 week"
- ExpiresByType application/x-javascript "access plus 1 week"
- ExpiresByType application/x-shockwave-flash "access 1 week"
- ExpiresByType image/x-icon "access 1 week"
- ExpiresDefault "access 1 week"
- </IfModule>
- # New servers may not handle .php errors correctly
- RewriteCond %{REQUEST_URI} \.php$
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteRule ^(.+)$ /404.php
- # Redirect index pages to non-index duplicates
- RewriteCond %{REQUEST_URI} (.+)/index.php$
- RewriteRule ^(.+)$ %1/ [L,R=301]
- RewriteCond %{REQUEST_URI} ^/index.php$
- RewriteRule ^(.+)$ / [L,R=301]
- # The following rules handle the fact that some file types may have different ways of being typed.
- # They also have different spellings (JPEG vs jpeg vs JPG vs jpg)
- RewriteCond %{REQUEST_URI} (.+)\.jpg$
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteRule ^(.+)$ %1.jpeg
- RewriteCond %{REQUEST_URI} (.+)\.jpeg$
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteRule ^(.+)$ %1.JPG
- RewriteCond %{REQUEST_URI} (.+)\.JPG$
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteRule ^(.+)$ %1.JPEG
- RewriteCond %{REQUEST_URI} (.+)\.JPEG$
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteRule ^(.+)$ %1.JPG [L]
- RewriteCond %{REQUEST_URI} (.+)\.png$
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteRule ^(.+)$ %1.PNG
- RewriteCond %{REQUEST_URI} (.+)\.PNG$
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteRule ^(.+)$ %1.png [L]
- RewriteCond %{REQUEST_URI} (.+)\.pdf$
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteRule ^(.+)$ %1.PDF
- RewriteCond %{REQUEST_URI} (.+)\.PDF$
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteRule ^(.+)$ %1.pdf [L]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement