Top Left Text cha

Web & App Development

Simple 301 Page Redirect:

Redirect 301 /examplepage.html http://example.com/newexamplepage.html
WWW to non-WWW:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*) http://example.com/$1 [L,R=301]

non-WWW to WWW:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC]

Old Domain to New Domain:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ http://example.net/$1 [L,R=301,NC]

Old File Extension to New File Extension:

RewriteEngine On
RewriteCond %{REQUEST_URI} .html$
RewriteRule ^(.*).html$ /$1.php [R=301,L]

Redirect /index.php to root:

RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$ http://www.domain.com/$1 [R=301,L]
/***** This will cause issues in Joomla when accessing the administration *****/
Comment (0) Hits: 2712

I'm talking specifically about Joomla & WordPress pre-fabricated templates that use the Bootstrap framework.

I hate bootstrap.  It's generic.  Very generic.  And as a developer, there's nothing I hate more than going to work on a site built by some amateur using a free or premium WordPress template - where bootstrap was used. And seeing all the unnecessary styles piled on top of each other over and over.  It's a giant mess.  Tons and tons of classes and styles crammed into elements everywhere.  Nothing comes out the way expected on the front end until you override the bootstrap styles.  It makes a mess out of what could be a nice clean template.

In my opinion, it's for amateurs that don't want to learn how to make it look the way they want by themselves.  It was created by developers at Twitter.  It has one thing in common with Twitter... it's unnecessary.
Comment (3) Hits: 22216

This is deprecated, but may still be of use on legacy websites.

if(cExt == "TXT" || cExt == "TEXT" || cExt == "JS" )

return "text/plain";
else if(cExt == "CSV" )
return "text/comma-separated-values"
else if(cExt == "HTM" || cExt == "HTML" || cExt == "ASP" || cExt == "CGI" || cExt == "PL" )
return "text/html";
else if(cExt == "PDF" )
return "application/pdf";
else if(cExt == "RTF" )
return "text/richtext";
else if(cExt == "XML" )
return "text/xml";
else if(cExt == "WPD" )
return "application/wordperfect";
else if(cExt == "WRI" )
return "application/mswrite";
else if(cExt == "XLS" || cExt == "XLS3" || cExt == "XLS4" || cExt == "XLS5" || cExt == "XLW" )
return "application/msexcel";
else if (cExt == "DOC" )
return "application/msword";
else if (cExt == "PPT" || cExt == "PPS" )
return "application/mspowerpoint"; 
else if (cExt == "WML" )
return "text/vnd.wap.wml";
else if (cExt == "WMLS" )
return "text/vnd.wap.wmlscript";
else if (cExt == "WBMP" )
return "image/vnd.wap.wbmp";
else if (cExt == "WMLC" )
return "application/vnd.wap.wmlc";
else if (cExt == "WMLSC" )
return "application/vnd.wap.wmlscriptc";
else if (cExt == "GIF" )
return "image/gif";
else if (cExt == "JPG" || cExt == "JPE" || cExt == "JPEG" )
return "image/jpeg";
else if (cExt == "PNG" )
return "image/x-png";
else if (cExt == "BMP" )
return "image/bmp";
else if (cExt == "TIF" || cExt == "TIFF" )
return "image/tiff";
else if(cExt == "XWD" )
return "image/x-xwindowdump";
else if(cExt == "IEF" )
return "image/ief";
else if (cExt == "AI" || cExt == "EPS" || cExt == "PS" )
return "application/postscript";
else if (cExt == "AU" || cExt == "SND" )
return "audio/basic";
else if (cExt == "WAV" )
return "audio/wav";
else if (cExt == "RA" || cExt == "RM" || cExt == "RAM" )
return "audio/x-pn-realaudio";
else if (cExt == "MID" || cExt == "MIDI" )
return "audio/x-midi";
else if (cExt == "MP3" )
return "audio/mp3";
else if (cExt == "M3U" )
return "audio/m3u";
else if (cExt == "AVI" )
return "video/avi";
else if (cExt == "MPG" || cExt == "MPEG" || cCat == "MPE" )
return "video/mpeg";
else if (cExt == "QT" || cExt == "MOV" || cExt == "QTVR" )
return "video/quicktime";
else if(cExt == "MOVIE" )
return "video/x-sgi-movie";
else if (cExt == "SWA" )
return "application/x-director";
else if (cExt == "SWF" )
return "application/x-shockwave-flash";
else if (cExt == "COM" || cExt == "EXE" || cExt == "DLL" || cExt == "OCX" )
return "application/octet-stream";
else if (cExt == "PDB" )
return "chemical/x-pdb";
else if (cExt == "ZIP" )
return "application/x-zip-compressed";

Comment (0) Hits: 2607
X