Ir a contenido

Fixing wordpress mod_rewrite/permalinks 404 errors


As I wrote some time ago for spanish readers, I was having HTML 404 errors in my logs (see awstats statistics before January 2008) which I wanted to solve.

My awstats collects web statistics from eldemonionegro.{com,org,es}/wordpress and eldemonionegro.{com,org,es}/gallery2. The problem should be solved in two different ways, as wordpress and gallery2 has two different approaches when rewriting URL request.
Problems in URL coming from wordpress were due to changes I did in the way that categories and some other URL staff were generated, so everything was rightly delimited.
In the other hand, problems with gallery2 arise from who knows where. With gallery2, HTLM 404 errors come from bad formed URLs, they are errors properly generated, but, those errors, wherever they come, needed to be transformed in proper URLs and as I don’t want to lose visitors, I wanted to move those, let’s say, “false URL” to good ones, so visitors are not loosed because of an external stupid engine. The point is that I solved those errors, but now others has appeared. “Stupids” are bringing me loads of fun ;).

How wordpress works is that it uses an internal rewriting system, with an external simple .htaccess in the root wordpress directory (at least in Debian with Apache2). If you want, you can see those internal rules using a plugin called internal rewrite viewer, it’s interesting.
Over this period you could also need some web server debug output activated (Apache2 in my case). Needed rules will be showed next, but use them carefully. As you should know, debuging is a terribly-horrible-madness performance killer.

# My own custom rules
<ifmodule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteCond %{REQUEST_URI} /wordpress/archivos/tag/(.+?)/?$
RewriteRule . /wordpress/etiquetas/%1 [R=301,L]
RewriteCond %{REQUEST_URI} /wordpress/archivos/category/(.+?)/?$
RewriteRule . /wordpress/tema/%1 [R=301,L]
</ifmodule>
# End Custom Rules
# Rules automatically generated by wordpress
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>
# END WordPress

Be careful of %{REQUEST_URI} instead of %{THE_REQUEST}

# In Debian my wordpress conf is saved into
# /etc/apache2/sites-enabled/wordpress.conf
<IfModule mod_rewrite.c>
RewriteLog “/var/log/apache2/rewrite.log”
# RewriteLogLevel 5
</IfModule>

If anyone’s interested in gallery2, I could show my suboptimal rules

Etiquetas: , , , , , , , , , ,

Actualización de feeds (II y fin)


Que no, que ya no tenéis nada de lo que preocuparos con respecto a los feeds.

Escribí la entrada anterior sobre los feeds porque no había sido capaz de dominar las “virguerías” que hace wordpress con las redirecciones de URL (con mod_rewrite de por medio).
Pero hoy me he superado a mi mismo, a costa de perder medio día, y parece que lo he solucionado.

Los que tengan interés técnico que permanezcan atentos a sus pantallas, en breve publicaré una entrada con los detalles, aunque será en inglés. Es que por más que buscas no encuentras nada útil.

No ha sido fácil. Ha requerido aprender algo del mod rewrite de apache, indagar en el funcionamiento de permalinks de wordpress y un rato de paciencia y tozudez.
Se podría hacer mejor, supongo, pero es lo que hay.

Etiquetas: , , , , ,

Actualización de feeds


Hola queridísimos lectores.

Seguro que muchos de vosotros no tenéis que tocar nada, pero aviso a todo bicho viviente. Se han cambiado algunas URL aunque sólo de cosas específicas. Las URL de los enlaces para estar al tanto de lo último (o feeds) principales no han cambiado.

No se muy bien en que momento hemos realizado una actualización en nuestro esquema de nombrado de categorías y páginas con un resultado penoso.
Lo penoso viene de las URL de las categorías y las etiquetas han pasado de unas URL del estilo

/wordpress/archivos/category/ocio/feed/
/wordpress/archivos/tag/reciclar-ordenador

a unas del estilo

/wordpress/tema/ocio/feed/
/wordpress/etiquetas/reciclar-ordenador

Al menos esto es lo que deduzco de los registros de URL no encontradas que contabilizamos en el servidor que aloja este rollo. Porque yo pensaba que (inocente) que se generaban de otra manera, no se, gente, no se.

Los cambios podéis ver que van encaminados a españolizar y clarificar en la medida de lo posible el significado de cada URL.

Bueno, aunque no lo diga nunca, cuando penséis que algo no funciona como debería avisad con buenas o malas palabras, me es indiferente.

Etiquetas: , , , , , , , ,

Upgrade to Wordpress 2.2 problems, exec php and gluedideas theme


As life is not like in Bamby, I’ve have had to waste my time on fixing this problem arose of The Upgrade.

One of the issues was that current theme has broken, a little bit :D, and that requires all my attention. The other one appeared after the first one was fixed, and was related to execphp widgets, which did not work at all.
I have not wanted to rollback because the upgrade has touched database and I thought that wouldn’t be easy to downgrade.

So my first move was to fix the theme.
The problem is about new widgets API, and till a final solution is reached I’ve this workaround.
(Continuar leyendo…)

Etiquetas: , , , , , ,

Qué graciosos los periódicos


Aun no se dan cuenta que tienen la batalla perdida con estos titulares en Internet.

Leer el propio artículo es como, ríete de lo que careces, que patada en los cojones.
Se meten, porque para mi el titular claramente ataca a las bitácoras, con algo que no entienden. Las bitácoras son un paso más para la información y la comunicación.

Primero la información llegó de la boca de otros y de los trovadores.
Después la imprenta ayudó a la difusión y estructuración de la información.
La televisión y la radio aportaron instantaneidad y cumplimentaron información y entretenimiento.
La Internet (”la Internet” porque es como decir “la red”) aporta ahora la retroalimentación y la discusión a TODOS. Bueno, la Internet y el fenómeno social que son las bitácoras, donde de una forma clara, directa e inmediata TODOS puede discutir entorno a un tema.

“Los bloggers deberían aspirar a cumplir las normas éticas de los medios tradicionales”

Tu hoy en día no puedes decir algo y quedarte tan pancho. Seas quien seas. Si dices algo te van contestar sobre tus propias palabras recién escritas. (Y no tienes que hacer como los periódicos grandes que discuten de tal forma que si no estás en el meollo piensas, ¿de qué hablan estos elitistas?)

Lo mejor de todo es que en la entrevista se habla de software libre, de comunicación y de bitácoras con Matt Mullenweg, creador de Wordpress (sofware que uso para gestionar esta bitácora). El títular es lo de siempre.

Etiquetas: , , , , , , , ,

Plugins


Aquí se muestran los plugins para wordpress que se utilizan en esta bitácora en este instante.

There are 64 plugins used: 44 active plugins and 20 inactive plugins.

Extensiones activas

Acronym Replacer (modificado) 2.8  Acronym Replacer (modificado) 2.8
» Joel Bennett (URL)
Wraps common acronyms with the acronym tag

Akismet 2.1.8  Akismet 2.1.8
» Matt Mullenweg (URL)
Akismet checks your comments against the Akismet web service to see if they look like spam or not. You need a WordPress.com API key to use it. You can review the spam it catches under “Comments.” To show off your Akismet stats just put <?php akismet_counter(); ?> in your template. See also: WP Stats plugin.

All in One SEO Pack 1.4.6.13  All in One SEO Pack 1.4.6.13
» Michael Torbert (URL)
Out-of-the-box SEO for your Wordpress blog.

Bad Behavior 2.0.23  Bad Behavior 2.0.23
» Michael Hampton (URL)
Deny automated spambots access to your PHP-based Web site.

Broken Link Checker 0.4.6  Broken Link Checker 0.4.6
» Janis Elsts (URL)
Checks your posts for broken links and missing images and notifies you on the dashboard if any are found.

Category Icons 2.0.7  Category Icons 2.0.7
» Brahim Machkouri (URL)
Assign icons to your categories easily.

Dagon Design Sitemap Generator 3.14  Dagon Design Sitemap Generator 3.14
» Dagon Design (URL)
Generates a fully customizable sitemap

Exec-PHP 4.8  Exec-PHP 4.8
» Sören Weber (URL)
Executes <?php ?> code in your posts, pages and text widgets.

Executable PHP widget 1.1  Executable PHP widget 1.1
» Otto (URL)
Like the Text widget, but it will take PHP code as well. Heavily derived from the Text widget code in WordPress.

Extended Live Archives 0.10beta-r18  Extended Live Archives 0.10beta-r18
» Arnaud Froment (URL)
Implements a dynamic archive, inspired by Binary Bonsai and the original Super Archives by Jonas Rabbe. Visit the ELA option panel to initialize the plugin.

Fuzzy Recent Comments 4.13  Fuzzy Recent Comments 4.13
» Denis de Bernardy (URL)
Terms of use • Doc/FAQ • Support forum — A WordPress widget that lists a fuzzy number of recently commented entries. To use, call the_recent_comments(); where you want the tile to appear. Alternatively, do nothing and the tile will display when wp_meta(); is called.

Fuzzy Recent Updates 4.13  Fuzzy Recent Updates 4.13
» Denis de Bernardy (URL)
A WordPress widget that lists a fuzzy number of recently updated entries.

Google Adsense for Feeds 1.1  Google Adsense for Feeds 1.1
» Matt Mullenweg (URL)
This puts Google RSS Ads in your feed, make sure you fill in your publisher ID by editing the plugin file.

Google Adsense widget 1.0  Google Adsense widget 1.0
» Otto (URL)
Like the Text widget, but specifically for Google Adsense blocks. Up to 4 instances of this widget may exist (since Google only allows 3 ads and one link block on a page). Heavily derived from the Text widget code included with the widget plugin by Automattic, Inc.

Google XML Sitemaps 3.1.0.1  Google XML Sitemaps 3.1.0.1
» Arne Brachhold (URL)
This plugin will generate a sitemaps.org compatible sitemap of your WordPress blog which is supported by Ask.com, Google, MSN Search and YAHOO. Configuration Page

Gravatar 1.1  Gravatar 1.1
» Tom Werner (URL)
This plugin allows you to generate a gravatar URL complete with rating, size, default, and border options. See the documentation for syntax and usage.

Joe's Quotes Widget 1.1  Joe's Quotes Widget 1.1
» Joseph Fieber (URL)
Adds a sidebar widget to display random quotes with an image

LinkLift (Widgets) 1.5  LinkLift (Widgets) 1.5
» Andreas Rayo Kniep (URL)
LinkLift-Textlinks-Plugin  ||  Sell text link ads off your blog for a fixed price per month. Register at http://www.linklift.es/  ||  The plugin automatically downloads your current text link ads from the LinkLift servers and saves them to the options-table of your Wordpress-database (’wp_options’). Configuration.

Page Links To 1.5  Page Links To 1.5
» Mark Jaquith (URL)
Allows you to point WordPress pages or posts to a URL of your choosing. Good for setting up navigational links to non-WP sections of your site or to off-site resources.

PXS Mail Form 2.6  PXS Mail Form 2.6
» Shane Marriott (URL)
Creates a mail form with multi part verification, various messages and an auto redirect on successful send. Originally based on the contact form by Ryan Duff. Enter {mailform} where you want the form. Recent updates include referrer checks, exploit management and the ability to run with the Markdown plugin. New feature for this release allows the sender to CC themselves.

Random Quotes 1.3  Random Quotes 1.3
» Dustin Barnes (URL)
This plugin allows you to embed random quotes into your pages. It also has a spiffy management tool in the administrative console.

Random Quote widget 1.0  Random Quote widget 1.0
» Abhijit Nadgouda (URL)
Widget to display a random quote, based on the wp_quotes plugin.

Recent Comments Widget 4.0  Recent Comments Widget 4.0
» Jared Bangs (URL)
This plugin will add a list of the most frequent comments posted to your blog. They are gathered in descending order (newest at the top), but then group them together by post title, so that comments from the same post are listed together. The list items will be links to the comments, and will contain the name of the commenter. Derived from the “Top/Recent Commenters” plugin by Scott Reilly (http://www.coffee2code.com/wp-plugins/)

Search Hilite 1.5  Search Hilite 1.5
» Ryan Boren (URL)
When someone is referred from a search engine like Google, Yahoo, or WordPress’ own, the terms they search for are highlighted with this plugin. Packaged by Matt.

Search Pages 2.3  Search Pages 2.3
» InternetOfficer SPRL (URL)
This makes search queries look at pages and posts instead of only posts. Based on the original Search Pages plugin by David B. Nagle. David was inspired by a WordPress hack created by Rob Schlüter.

Show Top Commentators 1.05  Show Top Commentators 1.05
» Nate Sanden (URL)
Encourage more feedback and discussion from readers, by rewarding them every time they post a comment! Readers with the most comments are displayed on your Wordpress blog, with their names (linked to their website if they provided one).

Simple Tags 1.5.7  Simple Tags 1.5.7
» Amaury BALMER (URL)
Simple Tags : Extended Tagging for WordPress 2.3 and 2.5 ! Autocompletion, Suggested Tags, Tag Cloud Widgets, Related Posts, Mass edit tags !

Sitemap Tags 1.0.2  Sitemap Tags 1.0.2
» Benjamin Stein (URL)
Add all SimpleTagging tag URLs or WordPress 2.3.x tag URLs to your Google Sitemap. (Note: WordPress prior to version 2.3 does not support tagging directly. You have to use the WordPress plugin SimpleTagging with WordPress versions < 2.3.)

Subscribe To Comments 2.1.2  Subscribe To Comments 2.1.2
» Mark Jaquith (URL)
Allows readers to receive notifications of new comments that are posted to an entry. Based on version 1 from Scriptygoddess

Text Link Ads 3.1.0  Text Link Ads 3.1.0
» Text Link Ads (URL)
Really Simple Web/RSS Advertising For Personal or Commercial Use

WassUp 1.6.2  WassUp 1.6.2
» Michele Marcucci, Helene D. (URL)
Wordpress plugin to analyze your visitors traffic with real time stats, chart and a lot of chronological informations. It has sidebar Widget support to show current online visitors and other statistics.

Widget Changer 1.2.5  Widget Changer 1.2.5
» Damien Oh (URL)
This plugin allows you to set a different widget for different pages

WordPress.com Stats 1.3.2  WordPress.com Stats 1.3.2
» Andy Skelton (URL)
Tracks views, post/page views, referrers, and clicks. Requires a WordPress.com API key.

WordPress DS-Lite Edition 1.0  WordPress DS-Lite Edition 1.0
» The Winksite Team - Christopher Collareta, Jason Sabella and David Harper (URL)
The WordPress Nintendo DS-Lite Edition Plugin displays a DS-Lite optimized view of your blog’s posts and pages for readers visiting your blog on a Nintendo DS-Lite.

WordPress Mobile Edition 2.1a  WordPress Mobile Edition 2.1a
» Alex King (URL)
Show a mobile view of the post/page if the visitor is on a known mobile device. Questions on configuration, etc.? Make sure to read the README.

WordPress PSP Edition 1.0  WordPress PSP Edition 1.0
» The Winksite Team - Christopher Collareta, Jason Sabella and David Harper (URL)
The WordPress PSP Edition Plugin displays a PSP optimized view of your blog’s posts and pages for readers visiting your blog on a Sony PSP.

WordPress Wii Edition 1.3  WordPress Wii Edition 1.3
» The Winksite Team - Christopher Collareta, Jason Sabella, and David Harper (URL)
The WordPress Wii Edition Plugin displays a Wii optimized view of your blog’s posts and pages for readers visiting your blog on a Nintendo Wii.

WP-DBManager 2.31  WP-DBManager 2.31
» Lester 'GaMerZ' Chan (URL)
Manages your Wordpress database. Allows you to optimize database, repair database, backup database, restore database, delete backup database , drop/empty tables and run selected queries. Supports automatic scheduling of backing up and optimizing of database.

WP-OpenID 2.2.2  WP-OpenID 2.2.2
» Will Norris (URL)
Allows the use of OpenID for account registration, authentication, and commenting. By Alan Castonguay.

WP-PageNavi 2.31  WP-PageNavi 2.31
» Lester 'GaMerZ' Chan (URL)
Adds a more advanced paging navigation to your WordPress blog.

WP-PluginsUsed 1.31  WP-PluginsUsed 1.31
» Lester 'GaMerZ' Chan (URL)
Display WordPress plugins that you currently have (both active and inactive) onto a post/page.

WP-PostViews 1.31  WP-PostViews 1.31
» Lester 'GaMerZ' Chan (URL)
Enables you to display how many times a post/page had been viewed.

WP-PostViews Widget 1.31  WP-PostViews Widget 1.31
» Lester 'GaMerZ' Chan (URL)
Adds a PostViews Widget to display most viewed posts and/or pages on your sidebar. You will need to activate WP-PostViews first.

WPG2 3.0.2  WPG2 3.0.2
» Ozgreg and WPG2 Team (URL)
Embeds Gallery2 within Wordpress to share photos, videos and any other Gallery2 content seamlessly into your Blog & Sidebar Content. Documentation, Support Forums, Change Logs

Extensiones inactivas

Access Keys 1.0  Access Keys 1.0
» Aaron Harun (URL)
This plugin allows you to add Access Keys to Category and Page navigation menus to make your website far more accessible.

Adsense-Deluxe 0.8  Adsense-Deluxe 0.8
» Acme Technologies (URL)
Place Google AdSense ads in your WordPress Posts. Requires WordPress 1.5 or higer. For complete usage and configuration click on AdsenseDeluxe under the “Options” menu.

AdSense Manager 3.2.13  AdSense Manager 3.2.13
» Martin Fitzpatrick (URL)
Control and arrange your AdSense & Referral blocks on your Wordpress blog. With Widget and inline post support, configurable colours.

Comment Karma 1.1  Comment Karma 1.1
» Alex Bailey (URL)
Allows you to rate comments up or down.

Compartelo (Share This) 1.4  Compartelo (Share This) 1.4
» Andres Scheffer (URL)
Adaptacion Y Traduccion del plugin Share This (alex king) al Castellano. Icono Social Unico para Compartir Contenidos (meneame; barrapunto; fresqui; loturak; etc.).

Drop-down Archive Widget 0.2  Drop-down Archive Widget 0.2
» Alan Morgan (URL)
Show a drop-down archive list.

Hello Dolly 1.5  Hello Dolly 1.5
» Matt Mullenweg (URL)
This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will randomly see a lyric from Hello, Dolly in the upper right of your admin screen on every page.

Multi-Topic Icon 1.5  Multi-Topic Icon 1.5
» Pablo Chinea (a.k.a. Khertz) (URL)
Topic Icon Plugin with support for posts in mainfold categories.

Random Redirect 1.1  Random Redirect 1.1
» Matt Mullenweg (URL)
Allows you to create a link to yourblog.example.com/?random which will redirect someone to a random post on your blog, in a StumbleUpon-like fashion. You can also specific in the URL `random_post_type` or `random_cat_id`.

Redirection 2.0.5  Redirection 2.0.5
» John Godley (URL)
A redirection manager

ShareThis 2.2  ShareThis 2.2
» ShareThis and Crowd Favorite (crowdfavorite.com) (URL)
Let your visitors share a post/page with others. Supports e-mail and posting to social bookmarking sites. Configuration options are here. Questions on configuration, etc.? Make sure to read the README.

Shylock Adsense 1.2  Shylock Adsense 1.2
» Shylock (URL)
Insert Adsense code in your pages without modifying the template. Show different ads for articles older then 7 days (or as old as you wish).

Theme Switcher 0.5  Theme Switcher 0.5
» Ryan Boren (URL)
Allow your readers to switch themes.

WP-Polls 2.31  WP-Polls 2.31
» Lester 'GaMerZ' Chan (URL)
Adds an AJAX poll system to your WordPress blog. You can easily include a poll into your WordPress’s blog post/page. WP-Polls is extremely customizable via templates and CSS styles and there are tons of options for you to choose to ensure that WP-Polls runs the way you wanted. It now supports multiple selection of answers.

WP-Polls Widget 2.31  WP-Polls Widget 2.31
» Lester 'GaMerZ' Chan (URL)
Adds a Poll Widget to display single or multiple polls from WP-Polls Plugin. You will need to activate WP-Polls first.

wp-scanner activator 1.0 Beta  wp-scanner activator 1.0 Beta
» Philipp Heinze for BlogSecurity.net (URL)
This Plugin adds <!- wpscanner -> to enable wp-scanner to scan your blog.

WP Internal Rewrite Viewer 1.0  WP Internal Rewrite Viewer 1.0
» Dagon Design (URL)
View the internal rewrites of WordPress (Usage: http://(your-wp-install)/rewrites/)

WP LaTeX 0.7  WP LaTeX 0.7
» Automattic, Inc. (URL)
Converts inline latex code into PNG images that are outomatically displayed in your blog posts and comments. Requires latex, dvipng and FauxML.

WP Paypal Donate Widget R2.0 R2.0  WP Paypal Donate Widget R2.0 R2.0
» Patrick Chia (URL)
Adds a sidebar widget to let users make donation.

WP Super Cache 0.7.1  WP Super Cache 0.7.1
» Donncha O Caoimh (URL)
Very fast caching module for WordPress. Once activated, you must enable the cache. Based on WP-Cache by Ricardo Galli Granada.

Etiquetas: , , ,