»
S
I
D
E
B
A
R
«
Did forcefsck leave you with a read-only filesystem?
Dec 14th, 2008 by Beth

Did you have some drive problems on your linux system and want to run fsck at boot time only to find that your system stays in eternal fsck-reboot mode?  When you try to remove the forcefsck file in single user mode, you discover that you can’t because the filesystem is in read-only mode?

Here’s what worked for us.

Interrupt the fsck and you’re in single user mode.

mount -o remount, -rw /dev/hda1 /

Now you can rm forcefsck

Replace hda1 in the line above with the appropriate device for your root filesystem.  It may /dev/sda1 or /dev/hda2

More details to follow.  I just wanted to blog about it before I forgot what we did.

Using mod rewrite to redirect someone based on their search phrase
Nov 17th, 2008 by Beth

Blogging is really fun and can provide people with lots of useful information.  When you’ve had a blog for as many years as I have, you see trends evolve. My blog is mainly about myeloma, but a lot of people go there to read about shingles.

People find the blog by searching on a variety of phrases, but they may find just one of my many pages about the experiences I’ve had with shingles.  What if I want them to land on my main shingles post that has a link to all the other pages? This bit of code from my .htaccess file ensures that folks who searched on “shingles” alone or in addition to  “picture,” “treatment” or “rash,” will be sent to the main blog post about shingles.

RewriteCond %{HTTP_REFERER} [?+&]?shingles[?+&]? [NC]
RewriteCond %{HTTP_REFERER} [?+&]?(picture|treatment|rash?)[?+&]? [NC]
RewriteCond %{REQUEST_URI} !^alternate_page\.html$
RewriteCond %{REQUEST_URI} !^([^/]+/)*[^/.]+\.[^/.]+$
RewriteRule .* http://myelomablog.com/shingles.php  [R=302,L]

You must be sure that RewriteEngine On is included and that your server (Apache) is allowing mod rewrite.  I have no idea how this would be accomplished using IIS, since I don’t use or care for IIS at all.  I’ve been using Apache since 1995 (on linux or some *nix), and will stick with what I know best (and what works best!).

Keep in mind that other rewrites put in place by programs such as Wordpress might interfere with your own code.  If you end up with errors, try another way.

»  RSS: feed   »  ConnectNC, Inc.: Web hosting
© ConnectNC, Inc. All rights reserved.