Drupal – Clean URLs module activation issues with Bluehost

Wednesday, February 1, 2012 Posted by

I installed Drupal in Bluehost and it seemed to work fine except one module called Clean URLs.

Reading and researching many articles and one thing for sure why I was not able to activate the module is the permission setting on .htaccess where (directory) I installed Drupal.   I also found out that I had to work one more extra step to solve the problem because of OS (MAC).   MAC naturally hides “.” files which is treated as a hidden file.

Once I compared drupal .htaccess file between my localhost and one on the bluehost, I realized what the problem was. BTW, you can easily edit the file through cPanel>manage files> directory where drupal is installed and fine .htaccess

If you want to compare .htaccess between your MAC localhost and bluehost, please follow the instruction below.  Otherwise skip down to code:

for MAC users do this step first
I used terminal: Applications > Utilities :
and type:
defaults write com.apple.finder AppleShowAllFiles TRUE
at next prompt:
killall Finder 

I found this info at Mac tricks and tips 

I copied and paste my local .htaccess  and paste to Bluehost one which is below (had to refresh the page few times… just FYI):
Hope this will work for you… and enjoy Clean URLs.

————
#

# Apache/PHP/Drupal settings:
#

# Protect files and directories from prying eyes.

Order allow,deny

# Don’t show directory listings for URLs which map to a directory.
Options -Indexes

# Follow symbolic links in this directory.
Options +FollowSymLinks

# Make Drupal handle any 404 errors.
ErrorDocument 404 /index.php

# Force simple error message for requests for non-existent favicon.ico.

# There is no end quote below, for compatibility with Apache 1.3.
ErrorDocument 404 “The requested file favicon.ico was not found.

# Set the default handler.
DirectoryIndex index.php index.html index.htm

# Override PHP settings that cannot be changed at runtime. See
# sites/default/default.settings.php and drupal_initialize_variables() in
# includes/bootstrap.inc for settings that can be changed at runtime.

# PHP 5, Apache 1 and 2.

php_flag magic_quotes_gpc off
php_flag magic_quotes_sybase off
php_flag register_globals off
php_flag session.auto_start off
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_flag mbstring.encoding_translation off

# Requires mod_expires to be enabled.

# Enable expirations.
ExpiresActive On

# Cache all files for 2 weeks after access (A).
ExpiresDefault A1209600
# Do not allow PHP scripts to be cached unless they explicitly send cache
# headers themselves. Otherwise all scripts would have to overwrite the
# headers set by mod_expires if they want another caching behavior. This may
# fail if an error occurs early in the bootstrap process, and it may cause
# problems if a non-Drupal PHP file is installed in a subdirectory.
ExpiresActive Off
# Various rewrite rules.

RewriteEngine on

# Block access to “hidden” directories whose names begin with a period. This
# includes directories used by version control systems such as Subversion or
# Git to store control files. Files whose names begin with a period, as well
# as the control files used by CVS, are protected by the FilesMatch directive
# above.
#
# NOTE: This only works when mod_rewrite is loaded. Without mod_rewrite, it is
# not possible to block access to entire directories from .htaccess, because
# is not allowed here.
#
# If you do not have mod_rewrite installed, you should remove these
# directories from your webroot or otherwise protect them from being
# downloaded.
RewriteRule “(^|/)\.” – [F]

# If your site can be accessed both with and without the ‘www.’ prefix, you
# can use one of the following settings to redirect users to your preferred
# URL, either WITH or WITHOUT the ‘www.’ prefix. Choose ONLY one option:
#
# To redirect all users to access the site WITH the ‘www.’ prefix,
# (http://example.com/… will be redirected to http://www.example.com/…)
# uncomment the following:
# RewriteCond %{HTTP_HOST} !^www\. [NC]
# RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#
# To redirect all users to access the site WITHOUT the ‘www.’ prefix,
# (http://www.example.com/… will be redirected to http://example.com/…)
# uncomment the following:
# RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
# RewriteRule ^ http://%1%{REQUEST_URI} [L,R=301]

# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at http://example.com/drupal uncomment and
# modify the following line:
# RewriteBase /drupal
#
# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
# RewriteBase /

# Pass all requests not referring directly to files in the filesystem to
# index.php. Clean URLs are handled in drupal_environment_initialize().
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^ index.php [L]

# Rules to correctly serve gzip compressed CSS and JS files.
# Requires both mod_rewrite and mod_headers to be enabled.

# Serve gzip compressed CSS files if they exist and the client accepts gzip.
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME}\.gz -s
RewriteRule ^(.*)\.css $1\.css\.gz [QSA]

# Serve gzip compressed JS files if they exist and the client accepts gzip.
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME}\.gz -s
RewriteRule ^(.*)\.js $1\.js\.gz [QSA]

# Serve correct content types, and prevent mod_deflate double gzip.
RewriteRule \.css\.gz$ – [T=text/css,E=no-gzip:1]
RewriteRule \.js\.gz$ – [T=text/javascript,E=no-gzip:1]
# Serve correct encoding type.
Header append Content-Encoding gzip
# Force proxies to cache gzipped & non-gzipped css/js files separately.
Header append Vary Accept-Encoding

—————

Video of the month…

Monday, May 16, 2011 Posted by
Comments closed

Dir. Spike Jonze and Ty Evans / music Unkle / 2009

The Lakai skateboarding team amaze as they navigate around an apocalyptic skate park. The Unkle track makes the experience completely amazing and surreal.

Disable Aero Shake in Windows 7 without gpedit.msc

Tuesday, April 26, 2011 Posted by
Comments closed

There is an obnoxious feature called Aero Shake in Windows 7. I found out that it’s even more obnoxious that there isn’t an easy way to turn the feature off in Windows 7 home edition.

First I have to excuse myself that I haven’t played with PC for a long time, so I needed a precise instruction to follow. When I search for “disable Aero Shake in Windows 7 home edition” most links asked me to find a file called gpedit.msc to open the Local Group Policy Editor, but the problem was that Vista and Windows 7 Home Edition don’t have the file to edit.

Link below is the one close to how I fixed the problem, but one problem with the instruction was I could not search Registry Editor (regedit) or HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows.

http://www.howtogeek.com/howto/windows-7/disable-aero-shake-in-windows-7/

Here is how: Click “Start” menu and right click “My Computer” and choose “Property” –>Policies → Microsoft → Windows. Now right click Windows folder and choose New → Key name it “Explorer”.
Right-click on the empty space in the left pane and select New > DWORD (32-bit) Value. (even if you have installed the 64bit version of Win7) Name the new valueNoWindowMinimizingShortcuts.

Double click on the newly created value and a new window will appear. In the textbox Value data enter the value 1:
and relog

CSS – em vs. px vs. percent

Wednesday, October 20, 2010 Posted by

I found some examples for my students and often times, I found myself with confusions between em vs px vs %.
So I googled it and found a very useful site. Title of the page is called: CSS Font-Size: em vs. px vs. pt vs. percent
: http://kyleschaeffer.com/best-practices/css-font-size-em-vs-px-vs-pt-vs/

The site explains what each units means and how it changes based on different setups for personal settings.
At the end of the article his conclusion was that:

“In theory, the em unit is the new and upcoming standard for font sizes on the web, but in practice, the percent unit seems to provide a more consistent and accessible display for users. When client settings have changed, percent text scales at a reasonable rate, allowing designers to preserve readability, accessibility, and visual design.”

Just a little reminder that this article was released in Sep. 08.

After I read the article, I immediately wanted to adjust text size and see how the web page would look like. However, I encountered a small problem. I could not find the option in my browser. (I use chrome)
So I clicked “Help” in the menu bar, but the result turned out that if I wanna change font size of the bowser I need to make changes of my computer default font settings.

Then I found this article: http://mezzoblue.com/archives/2008/10/07/zoom/

“Somehow over the last year or two we’ve landed in a situation where most browsers now default to full page zoom instead of traditional text-resizing.
Opera has long used zoom instead of text scaling; as of IE7 Internet Explorer uses zoom to replace the older resizing method; Firefox 3 now defaults to zoom as well. Safari is really the only holdout at this point (and I suppose Chrome by extension, since they both run the same WebKit rendering engine) but, oh look, it’s coming soon to a future release.
Now it’s true that Firefox and Internet Explorer still offer the ability to scale text as they always have, but a user has to look for it; if there’s anything we’ve learned from that latter browser it’s that users aren’t inclined to change default choices on their computers, so I think it’s safe to assume most users will employ the newer method, if at all.
The implications on a designer are fairly dramatic; page zoom is an attempt to continue accurately rendering the page as it was designed, whereas text scaling simply reflows the text, often causing serious layout problems. With full page zoom, the responsibility for ensuring page integrity and legibility is moved out of the designer’s hands, and placed fully on the browser. With text resizing, the designer needs to be conscientious of the ways their layout will break at different text sizes, and compensate accordingly.
So, personal preference aside, I wonder whether designing around scaling text is still a skill we need to hold on to, and for how long. I’d be interested in hearing about reasons for and against, as I’m sure there will be both.”

It makes sense to zoom in and out to adjust one’s browser for desirable/viewable websites size for standardizing font units and more consistent layout of a page rather than changing font size.

need to think about how to create energy

Monday, August 9, 2010 Posted by
Comments closed

SHAWN FRAYNE: Shawn is the sole inventor or co-inventor on a number of US and international patent filings. He has his Bachelor of Science in Physics from the Massachusetts Institute of Technology.

Shawn is the inventor of the core wind generator technology on which Humdinger is founded. Previous to his involvement with Humdinger, Shawn successfully matured several technologies, in the fields of self-inflating packaging and water disinfection, from concepts into developed products. He established a strong intellectual property base surrounding those technologies and in early 2006 sold substantial rights to a multinational company.  Some of Shawn’s work has been profiled in Popular Mechanics, Discover, Forbes.com, and NPR.

My thoughts: He came up with winddinger when he worked in Tahiti.  Tahiti regulates many import restrictions and he had to come up with small, cheap, and low maintenance to power up basic needs for the place.

He sees, and I truly believe, that the idea of inventing cheap & open source idea to create energy/products will change  the perspective of future.

Efficiency!

wind vs water vs solar vs etc

http://www.youtube.com/watch?v=mecU7S2xoJc

http://www.humdingerwind.com/