What is .htaccess:
.htaccess (hypertext access) is the default name of a directory-level configuration file that allows for decentralized management of web server configuration. -Wikipedia
.htaccess is a way to modify the web server without editing the Master file.
In Apache the master file is called httpd.conf
How to create 404 and 403 pages:
404 pages appear when it doesn't exist (alternative to index.html in every directory on site) and 403 is a page exist but is forbidden to access.
In order for .htaccess to work you need to configure httpd.conf
AllowOveride must be set to All. See below. Remember its case sensitive. For some reason apache ships as "all" instead of a capitalized "All".
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
What to put in .htaccess:
ErrorDocument 404 /yourerrorpage.html
ErrorDocument 403 /yourerrorpage.html
# Options -Indexes is what allows the 403 error to work
Options -Indexes
If you don't want to use .htaccess you can simply put
ErrorDocument 404 http:yourerrorpage.html
ErrorDocument 403 /yourerrorpage.html
Warning: Make sure you always restart Apache when changes are made to the httpd.conf because the changes won't be taken into effect until you do
You must edit httpd.conf at the server, you can't use ftp unless it's not secured. It should be located at /etc/apache2/httpd.conf
How to rewrite URLs?
To manipulate your links like transfroming ?name=page&URL's into /friendly/cute/links
you must activate rewrite_module in Apache.
Left click on the wamp icon then hover over "Apache" and go to "Apache Modules" and click on rewrite_module (or mod_rewrite) so it has a check. (or 500 Internal Server Error may throw)
or open httpd.conf and uncomment(remove #) the line below
LoadModule rewrite_module modules/mod_rewrite.so
Wait for Apache to restart.
In .htaccess insert this code:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) mvc/index.php/$1
------or-------
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]
More information:
http://corz.org/serv/tricks/htaccess2.php
Good MVC clean URL video
_________________________________________________
Ubuntu sever 11.10
Now the mod rewrite is a little different in the Ubuntu server. You have to create a "rewrite.load" symlink from /etc/apache2/mods-available to /etc/apache2/mods-enabled by running:
$ sudo a2enmod rewrite
then edit:
$ sudo nano /etc/apache2/sites-available/default
and make line 11 to AllowOverride None to AllowOverride All, see snippet below
<Directory /home/marko/public_html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
then restart apache:
$ sudo service apache2 restart
reference: http://www.techytalk.info/enable-apache-mod_rewrite-on-ubuntu-linux/
description: mod_rewrite wamp, .htaccess issue (500 - Internal Server Error), .htaccess apache mvc configuration 500, redirecting and rewriting
Wednesday, July 20, 2011
Monday, July 18, 2011
Debugging for Internet Explorer
I posted earlier that I will stop going out of my way to make a site compatible with Internet Explore. However that is not a choice for everyone and if you have a client who is out of touch they might want comparability with IE so here is a link to My Debugbar IE tester. Its a free software that allow you to test your website on all IE version without having to download IE.
Seen at Slice and Dice that PSD second video towards the end.
Seen at Slice and Dice that PSD second video towards the end.
Sunday, July 17, 2011
Reset CSS
Reset stylesheet is to reduce browser inconsistencies in things like default line heights, margins and font sizes of headings, and so on
Paste code below in stylesheet and delete the elements you do no need
Paste code below in stylesheet and delete the elements you do no need
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
Saturday, July 16, 2011
Creating columns in website
This tutorial shows how to create columns in website and prevents the div from wrapping when the browser is minimized

Syntax Source:

Syntax Source:
<html>
<head>
<style>
#main {
width: 600px;
}
.col {
float: left;
border: 1px solid red;
padding: 10px;
margin: 0px 20px 0px 0px;
}
</style>
</head>
<body>
<h1>Columns</h1>
<div id="main">
<div class="col">
<h3>Title</h3>
<p>asdfasdfxiv</p>
<p>asdfasdfxiv</p>
<p>asdfasdfxiv</p>
</div>
<div class="col">
<h3>Title</h3>
<p>asdfasdfxiv</p>
<p>asdfasdfxiv</p>
<p>asdfasdfxiv</p>
</div> <div class="col">
<h3>Title</h3>
<p>asdfasdfxiv</p>
<p>asdfasdfxiv</p>
<p>asdfasdfxiv</p>
</div>
</div>
</body>
</html>
Cancel an eBay bid
Buyer wanting to cancel
fill out the Bid Retractions form.
Warning!! Retraction request are not accepted if it was placed more than an hour ago and is for an auction that ends in 12 hours or less.
Seller wanting to cancel
fill out the cancel bid form
fill out the Bid Retractions form.
Warning!! Retraction request are not accepted if it was placed more than an hour ago and is for an auction that ends in 12 hours or less.
Seller wanting to cancel
fill out the cancel bid form
Wednesday, July 13, 2011
No security
Be careful when you trust your job. I had a couple of bad experiences at a job. You never know if your boss is going to fire you, lay you off, go out of business, or disapprove you work history. I always try to improve my skill. The main reason is that if I lose my job at least I can fall back on something. Whatever skill you acquire at your job rarely will be transferred to another. Your going to have to start from the bottom again. I worked at many places where the supervisor only watches people and surf the internet for a living. It makes me sad to know that they're screwed if they lose their job. Be like the ant the prepares for the winter, do this in all areas of life.
Monday, July 11, 2011
Finding the Solution
Sometimes finding a solution to a problem is best not thinking.
When I was trying to solve a javascript loop problem I tried so hard to figure it out but later got distracted by someone speaking to me and when I came back the answer came to me in a split second.
When I was building the FQ shows I couldn't figure out how to get the dreamweaver snippet interact with php. I went to the movies to watch Tron and when I came back the answer came to me instantly.
Sunday, July 10, 2011
Wednesday, July 6, 2011
What to say to haters
Don't let someone discourage you in achieving your goal.
Fill in the blanks:
I was _________ before you came and I will be _________ after you leave.
Fill in the blanks:
I was _________ before you came and I will be _________ after you leave.
Sunday, July 3, 2011
No off Season
When I wrestled in high school what separated the best wrestlers from the crap wrestlers was there was no such thing as an off season. We trained all year round.
Part of the season was training, competing, testing your skills and winning awards and the second part was just training. The first part was the funnest, most rewarding, shortest and the in season.
After the season ended more than a third of the team stopped training and came back when the "season" started back again. All those who did this eventually quit or achieved mediocre success. Whats great about an individual sport is that all the work you put in is exposed. There's no one to blame but yourself.
Whats separates the champion from the loser is sometimes "showing up". Working at your goal not only when you feel like it but when you don't, in season and out of season. Remember there's no such thing as an off season to the successful.
Part of the season was training, competing, testing your skills and winning awards and the second part was just training. The first part was the funnest, most rewarding, shortest and the in season.
After the season ended more than a third of the team stopped training and came back when the "season" started back again. All those who did this eventually quit or achieved mediocre success. Whats great about an individual sport is that all the work you put in is exposed. There's no one to blame but yourself.
Whats separates the champion from the loser is sometimes "showing up". Working at your goal not only when you feel like it but when you don't, in season and out of season. Remember there's no such thing as an off season to the successful.
Saturday, July 2, 2011
Learning Git
Git allows you to work on your code with the peace of mind that everything you do is reversible. It makes it easy to experiment with new ideas in a project and not worry about breaking anything.
Resources:
nettus.com
gitcasts.com
Git Magic
Resources:
nettus.com
gitcasts.com
Git Magic
Friday, July 1, 2011
Wednesday, June 29, 2011
Quote: Your Time is Limited
“Your time is limited, so don't waste it living someone else's life. Don't be trapped by dogma - which is living with the results of other people's thinking. Don't let the noise of other's opinions drown out your own inner voice. And most important, have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.”
-Steve Jobs at Stanford Commencement
Tuesday, June 28, 2011
Windows Microphone doesn't work
Recently I've been having issues with my computer microphone both in linux and windows. I solved the linux problem now here is the windows.
Note: I recently installed a new operating system
Note: I recently installed a new operating system
One of the reason why your microphone isn't working is because "Realtek High Definition Audio" drive isn't installed.


What we need to do is install Realtek High Definition Audio. Click here to install (Vista and Windows 7)
When dowloaded extract it with winrar.
Then open the extracted folder and click "Setup" icon.
Once your computer reboots the microphone will start working.
Make sure all other setting are configured like the volume and the microphone is plugged in.
Any questions leave it in the comments
Monday, June 27, 2011
Put yourself First
Create for yourself first then share it with the world. At least someone will use it.
Examples:
Andrew Kramer from videocopilot.net
Drew Houston from dropbox.com
37signals Basecamphq.com
Feel free to add more in the comments...
Examples:
Andrew Kramer from videocopilot.net
Drew Houston from dropbox.com
37signals Basecamphq.com
Feel free to add more in the comments...
Saturday, June 25, 2011
YouTube Success
Internet is one of the best things that happened to mankind. To have the ability to build a business from scratch is liberating. Your internet success isn't determined by your weight, height, race, nationally, looks, gender, family background or your boss but by you.
Freddiew has been able to create a successful business by making youtube videos. He also shares his knowledge. Read his post on how to become a successfull youtuber.
As a side note, I think too many people get hung up on ideas. From my experience, ideas are worthless. Execution is more important than anything else-FreddieW
Wednesday, June 22, 2011
Programming and Writing have in common
Have you ever heard someone say? "You build it before, build it again".
Its like telling a writer to rewrite a book word for word. You will be able to write the story again but not word for word. Its impossible! Creating applications is the same when coding you're in the present and the creativity is flowing but once you leave that state you may have to start all over (research) to recreate the application. It's important to document all your discoveries.
Don't try to learn every function in the language but be an expert at the basics and add as time goes.
Monday, June 20, 2011
Windows Activation Expired
If your running windows and all of sudden your computer says that your activation has expired and you own the operating system on your computer because you bought it from the store. The way you can easily access your files in to run your computer in Safe Mode and it will bypass the warning.
Saturday, June 18, 2011
Brand New Computer for $50
I owned many computers and all of them had the same fate. After 2 years it became very slow to the point where I needed to delete all the memory and reset to factory settings. The computer did run faster but it would get slow again in half of the time when I first bought it. Eventually I was forced to buy a new computer because resetting wasn't resolving the problem.
Here is what I discovered. Older technology is not the main reason why your PC slows down its the internal hard drive. Consider your hard drive like your breaks in your car. The more you use it the worse it gets.
You want a brand new computer? Change the internal hard drive (you will need to install an operating system). You can buy new one 500gb for $49. Click here to see the one I bought.
Here is what I discovered. Older technology is not the main reason why your PC slows down its the internal hard drive. Consider your hard drive like your breaks in your car. The more you use it the worse it gets.
You want a brand new computer? Change the internal hard drive (you will need to install an operating system). You can buy new one 500gb for $49. Click here to see the one I bought.
Wednesday, June 15, 2011
Internet Explore extinction
Two years ago the only browser I had installed on my computer was internet explore. I always used IE and never understood why people had something against it until I started using Chrome. Everyday that goes by I hate IE more.
From a developer prospective you need to always make exceptions for that piece of crap software and as an user for its extremely slow and unfriendly interface.
It seems that Microsoft doesn't care. They don't change or improve their software.
Microsoft you think you can get away with this crap huh? Its Internet Explore extinction. I won't create or allow anyone with an IE browser to access my website. I'm not getting that many users from IE anyways. Below is how I'm going to do it.
<!--[if IE]>
<script>location = 'http://chrome.google.com'; </script>
<![endif]-->
I'm going to put this code inside the <head> tags of my site and its going to redirect the user to download chrome.
Subscribe to:
Posts (Atom)