Using Apache mod_rewrite to remove sub-directories from URL

Using Apache mod_rewrite to remove sub-directories from URL I'm managing an instance of Wordpress where the URLs are in the following format: /example-category/blog-post-permalink/ The blog author did an inconsistent job of adding categories to posts, so while some of them had legitimate categories in their URLS, at least half are "uncategorised". I can easily change Wordpress to render the URL without the category name (e.g., /blog-post-permalink/), but I'd like to create a mod_rewrite rule to automatically redirect any requests for the previous format to the new, cleaner one. How can I use a mod_rewrite recipe to handle this, taking into account that I want to honor requests for the real WordPress directories that are in my webroot? 1 Answer Something as simple as: RewriteRule ^/[^/]+/([^/]+)/?$ /$2 [R] Perhaps would do it? That simple redirects /foo/bar/ to /bar That seems to work great with my testing so far. Thanks for the help! Joomla Blog/Wordpre...

Joomla Blog/Wordpress Integration

Joomla Blog/Wordpress Integration I'm looking for a wordpress-like blog interface to put inside a Joomla hosted site. The admin interface of Joomla is quirky enough and hard enough to use that daily updates are infeasible. What I am looking for is an easy-to-use posting interface that supports multiple users with different accounts/names, a tagging scheme, and easy find by date/user/tag functionality. In particular I'm looking for a relatively easy-to-deploy, out-of-the-box solution, and would prefer not to hack rss feeds together or write too much custom code. I know there are several extensions out there but they all receive largely mixed reviews... Has anyone used any of these? Or has anyone had experience putting something like this together? 4 Answers Well you could do this - have a wordpress installation. Get the users to post there and then use the RSS feed from it (or the XML RPC Blogging API) to update the Joomla installation. You will have to write the update p...

Running a scheduled task in a Wordpress plug-in

Running a scheduled task in a Wordpress plug-in I'm trying to write a Wordpress plug-in that automatically posts a blog post at a certain time of day. For example, read a bunch of RSS feeds and post a daily digest of all new entries. There are plug-ins that do something similar to what I want, but many of them rely on a cron job for the automated scheduling. I'll do that if I have to, but I was hoping there was a better way. Getting a typical Wordpress user to add a cron job isn't exactly friendly. Is there a good way to schedule a task that runs from a Wordpress plug-in? It doesn't have to run at exactly the right time. 4 Answers codex wordpress: Function_Reference -> wp_schedule_event pseudo-cron is good but the two issues it has is It requires someone to "hit" the blog to execute. Low volume sites will potentially have wide ranging execution times so don't be two specific about the time. The processing happens before the page loads. So ...

Wordpress Category Template Question

Wordpress Category Template Question I am looking at using a custom template for a set of categories. Is it possible to use a category template (like category-4.php) on a parent category and have the children use that template as well? So based on the answer so far, is there a way to accomplish this? I want to add text and images to all categories within a parent category. 1 Answer From the documentation it does not appear to be possible without actually adding several category template files (unless you custom program it). I run Wordpress, and I have only seen it accomplished category by category. Wordpress MediaWiki Cookie Integration I have my Wordpress install and MediaWiki sharing the same login information. Unfortunately, users need to log into both separately, but at least they use the same credentials. What I would like to do is cause a successful login on the Wordpress blog to also cause a login for MediaWiki (ideally both directions). There are two ways this could h...

Wordpress MediaWiki Cookie Integration

Wordpress MediaWiki Cookie Integration I have my Wordpress install and MediaWiki sharing the same login information. Unfortunately, users need to log into both separately, but at least they use the same credentials. What I would like to do is cause a successful login on the Wordpress blog to also cause a login for MediaWiki (ideally both directions). There are two ways this could happen: Logging in causes a login on the other application (writes the cookie and creates the session in the DB) Accessing an application checks for the cookie of the other and then automatically logs in. Since the usernames are shared it seems like the latter should be pretty easy to do. Any tips would be great. 4 Answers The primary problem you are going to run into is that you'll have two login forms, and two logout methods. What you need to do is pick one of the login forms as the default, and redirect the other one over to it. I've been able to successfully integrate bbPress + MediaWik...