Jordan Hofker, Fargonaut

Three .htaccess rules that help unclutter Wordpress themes

I do Wordpress themes fairly regularly. They aren't amazing works of art, but they're (generally) perfectly functional sites that meet the needs of the folks using them.

To make my theme-developing life easier, I typically add the three following rules to the .htaccess file:

RewriteRule ^css/(.*) /wp-content/themes/[my-theme]/css/$1 [QSA,L]
RewriteRule ^js/(.*) /wp-content/themes/[my-theme]/js/$1 [QSA,L]
RewriteRule ^images/(.*) /wp-content/themes/[my-theme]/images/$1 [QSA,L]

Why? Well, instead of making script, style, and image references something like:

http://www.mysite.com/wp-content/themes/my-theme/css/style.css

I can simply do:

http://www.mysite.com/css/style.css

Personally, I haven't seen a downside to this yet. Maybe if Apache decides to stop handling rewrite rules or something, but I'd imagine there would be bigger problems if that were the case.

I'm putting these here so I can always find them and they might possibly help someone else, too.

Filed under  //   wordpress  

Some sites blacked out - Fight SOPA and PIPA

They're not cute fuzzy animals.

(download)

Adding more as I come across them.

(download)

Ellie

Media_httpphotoshofke_hzefv

I have a niece! You suckers can expect more on this later.

Company Holiday Party

Pretty fun. First year the band has had a real stage.

Thanksgiving

Media_httpphotoshofke_hnasq

Hey look, Thanksgiving photos! First one is bacon, so that's neat.

I definitely should have taken more. Why didn't I?

Kurt| Flickr - Photo Sharing!

Media_httpfarm7static_zmdcy

From a video we're working on for our company holiday party.