[ home | files | links | topics | stickers | about ]

Todays Stats

Visitors: 45
Referrers: 6
User Agents: 22
Pages Served: 77
Total Pages



User Friendly URLs
neodux : by Tommy - October 9th 2011, 11:01PM
Thanks to mod_rewrite and a little "why didn't I think of this before?", Neodux now has user-friendly URLs. Now instead of "cryptic" URLs with "?" and "&" signs in them, you can now just type in /read/ and the name of the blog entry you're interested in.

To see this feature in action, you can click on this story's title, or the "Full article" link. This should not affect old links and I'd also ask that you please inform me if you see some functionality is all messed up. I think I caught all possible errors, but you can easily overlook some parts of a project like this.

So, bottom line, links to Neodux should be much more friendly and bookmarks should be easier to understand. Enjoy!

update: Yes, old links should still work. Too many blogs and sites around the web link back to articles here and I didn't want to screw them up. So everything should work seemlessly.

tags: neodux mod_rewrite

( Comments : 1 | Full article )

mod_rewrite: URL modification
programming : by Corey - October 2nd 2010, 07:22AM
To say that there is extensive documentation on Apache and its various plugins, including mod_rewrite, is to grossly understate the term. Documentation is voluminous to the point of beginning to wonder if the various authors had a combined total of more than five dates with actual girls in the history of their lives.

Disgruntled, then, was I to discover that on the entirety of the Internet, there was no documentation surrounding what I needed to accomplish. I've since come to realize that this is likely due to the obscurity of the issue or the availability of other commonly known tools to accomplish the task I had before me.

That task: Rewriting and redirecting a URL from my local environment using Apache and mod_rewrite.

Without delving into specifics, I needed to take an HTTP request generated by a page viewed in my browser and direct that request to another location, including a change of domain.

Now, the more seasoned among you may resolve that the very purpose of mod_alias is to perform this task. However, just because I'm a glutton for punishment, in this particular case, I also need to change the value of a query string parameter in the URL having its domain changed. Gaze upon the domain of mod_rewrite, ye mighty, and despair.

While mod_alias is designed to handle the translation of domains, mod_rewrite is designed to handle that and query string parameters (as well as a bunch of other stuff that I have no idea about). Before we can start directing URLs to and fro, we must first setup Apache.

I'll not regale the reader with the riveting tale of that process as it is rather well (and usefully) documented. The mod_rewrite module must be included in httpd.conf and the Apache instance must be configured to run as on port 80. Do be wary of configuring the server value as localhost because sometimes the value does not translate, especially in Windows.

Continue reading...

tags: Apache mod_rewrite URL modification redirection cake pie howto

( Comments : 1 | Full article )


-+- neodux blog -+-
Page generated for in 0.29688 seconds.
rss 2.0 feed