Title: nikc's Replies | WordPress.org

---

# nikc

  [  ](https://wordpress.org/support/users/nikc/)

 *   [Profile](https://wordpress.org/support/users/nikc/)
 *   [Topics Started](https://wordpress.org/support/users/nikc/topics/)
 *   [Replies Created](https://wordpress.org/support/users/nikc/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/nikc/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/nikc/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/nikc/engagements/)
 *   [Favorites](https://wordpress.org/support/users/nikc/favorites/)

 Search replies:

## Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[RSS Image Feed] Bug in RSS Image Feed options page](https://wordpress.org/support/topic/bug-in-rss-image-feed-options-page/)
 *  Thread Starter [nikc](https://wordpress.org/support/users/nikc/)
 * (@nikc)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/bug-in-rss-image-feed-options-page/#post-7289560)
 * I patched the plugin with this code to fix the issue:
 *     ```
       function validate_options($input) {
       	$newinput = array();
       	$newinput['image_size'] = trim($input['image_size']);
       	$newinput['image_number'] = trim($input['image_number']);
       	$newinput['excerpt_size'] = trim($input['excerpt_size']);
   
       	$boolFields = array(
       		"responsive",
       		"media_content",
       		"enclosure",
       		"notext",
       		"force_excerpt",
       	);
   
       	foreach ($boolFields as $fieldName) {
       		if (isset($input[$fieldName]) && is_bool($input[$fieldName])) {
       			$newinput[$fieldName] = $input[$fieldName];
       		} elseif (isset($input[$fieldName]) && "1" === $input[$fieldName]) {
       			$newinput[$fieldName] = true;
       		} else {
       			$newinput[$fieldName] = false;
       		}
       	}
   
       	/* ... */
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Change CSS/Style of posts by different post tags?](https://wordpress.org/support/topic/change-cssstyle-of-posts-by-different-post-tags/)
 *  [nikc](https://wordpress.org/support/users/nikc/)
 * (@nikc)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/change-cssstyle-of-posts-by-different-post-tags/#post-1047945)
 * Use `get_the_tags` and match for the tag you’re looking for. If you get a match,
   add a css-class to add a border.
 * [http://codex.wordpress.org/Template_Tags/get_the_tags](http://codex.wordpress.org/Template_Tags/get_the_tags)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [301 to non-www (instead of default 302)](https://wordpress.org/support/topic/301-to-non-www-instead-of-default-302/)
 *  [nikc](https://wordpress.org/support/users/nikc/)
 * (@nikc)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/301-to-non-www-instead-of-default-302/#post-1046764)
 * What you’re looking for is mod_rewrite. There are plenty of howtos around that
   will hand the solution to you. Google is your friend here.
 * I recommend the Apache reference, if you’re already atleast vaguely familiar 
   with mod_rewrite [http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html](http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html)
 * But basically, this is what you’re after (mind you, this is off the top of my
   head and untested):
 *     ```
       RewriteEngine on # Turns on the RewriteEngine
       RewriteCond %{HOST} ^www\.host\.com$ # Match to your domain with www-host
       RewriteRule .* http://host.com$1 [R=301] # Redirect to non www-host
       ```
   
 * Good luck in your endeavors.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [2.6.0 > 2.6.2 upgrade. Lost access to Admin login](https://wordpress.org/support/topic/260-gt-262-upgrade-lost-access-to-admin-login/)
 *  [nikc](https://wordpress.org/support/users/nikc/)
 * (@nikc)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/260-gt-262-upgrade-lost-access-to-admin-login/#post-854608)
 * Yes, the redirect seems to be broken, or atleast crippled.
 * If I access the admin via myblog.com/wp-admin it shows me the login screen regardless
   if I’m previously logged in or not, and always returns me to the login screen
   regardless of successful login or not.
 * However myblog.com/wp-admin/ (with trailing slash) redirects correctly with or
   without authentication in between.
 * IIRC this behaviour (requiring the trailing slash) wasn’t there in previous versions.
   To non-techy users this is also a possible cause of confusion and desperation.(
   Witnessed with my gf.)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [WordPress.com stats and WP-Cache](https://wordpress.org/support/topic/wordpresscom-stats-and-wp-cache/)
 *  Thread Starter [nikc](https://wordpress.org/support/users/nikc/)
 * (@nikc)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/wordpresscom-stats-and-wp-cache/#post-881257)
 * Thanks for your reply. It made me look elsewhere and find out that the problem
   was a theme-issue. (No wp-footer() -call.)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [2.6.0 > 2.6.2 upgrade. Lost access to Admin login](https://wordpress.org/support/topic/260-gt-262-upgrade-lost-access-to-admin-login/)
 *  [nikc](https://wordpress.org/support/users/nikc/)
 * (@nikc)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/260-gt-262-upgrade-lost-access-to-admin-login/#post-854527)
 * Same problem with me.
 * Further than that, WP is losing my password all the time, ever since I upgraded.
 *   Forum: [Installing WordPress](https://wordpress.org/support/forum/installation/)
   
   In reply to: [hmmm ? about blog template](https://wordpress.org/support/topic/hmmm-about-blog-template/)
 *  [nikc](https://wordpress.org/support/users/nikc/)
 * (@nikc)
 * [20 years ago](https://wordpress.org/support/topic/hmmm-about-blog-template/#post-419128)
 * You should upload and decompress it to the _wordpress/wp-content/themes/_ directory,
   where it should after that have it’s own subdir. After that it should show up
   as a separate theme that you will be able to activate.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [New page returning 404](https://wordpress.org/support/topic/new-page-returning-404/)
 *  Thread Starter [nikc](https://wordpress.org/support/users/nikc/)
 * (@nikc)
 * [20 years ago](https://wordpress.org/support/topic/new-page-returning-404/#post-331460)
 * It just hit me why this solution (remove _blog_ from the slug) worked for me,
   but should’nt be considered a fix for this problem.
 * I am running my WP installation on a subdomain _blog.nikc.org_. This is achieved
   by using _mod\_rewrite_ for redirecting the request to the appropriate directory,
   instead of having a “real” _VirtualHost_.
 * This directory contains the word _blog_, and matching is performed against it(
   in the _$REQUEST\_URI_) to avoid a never ending redirection loop.
 * Because I am matching _blog/_ (with the slash) is probably why the page worked
   without the trailing slash. Why it didn’t work, was because the url (_about-this-
   blog/_) which ended in _blog/_ didn’t match the _RewriteCond_, and thus never
   reached WP.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [New page returning 404](https://wordpress.org/support/topic/new-page-returning-404/)
 *  Thread Starter [nikc](https://wordpress.org/support/users/nikc/)
 * (@nikc)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/new-page-returning-404/#post-331331)
 * That solved it, thanks!
 * I tried meddling with the slug myself, but always kept the word ‘blog’ in it.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [New page returning 404](https://wordpress.org/support/topic/new-page-returning-404/)
 *  Thread Starter [nikc](https://wordpress.org/support/users/nikc/)
 * (@nikc)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/new-page-returning-404/#post-331328)
 * Experimented some more, and turns out this link works when you omit the trailing
   slash.
 *  [http://blog.nikc.org/about-this-blog](http://blog.nikc.org/about-this-blog)
 * I’m baffled. The link to my other page works like a charm, with or without a 
   trailing slash.
 *  [http://blog.nikc.org/books-read-while-in-thailand/](http://blog.nikc.org/books-read-while-in-thailand/)
   
   [http://blog.nikc.org/books-read-while-in-thailand](http://blog.nikc.org/books-read-while-in-thailand)
 * Here’s the contents of my .htaccess just in case it could help. I do however 
   suspect the fault is elsewhere.
 * —————–8<—————–
    # BEGIN WordPress ### BEGIN wp-recent-links rules RewriteRule
   ^recent-links/feed?/?$ wp-recent-links-rss2.php [QSA] RewriteRule ^recent-links?/?
   $ wp-recent-links.php [QSA] RewriteRule ^recent-links/([0-9]{4})?/?([0-9]{1,2})?/?
   $ wp-recent-links.php?y=$1&m=$2 [QSA] ### END wp-recent-links rules <IfModule
   mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME}!-
   f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule
   >
 * # END WordPress
    —————–>8—————–
 * I have tried removing the recent links-part, but it doesn’t change anything.
 * Many thanks!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [New page returning 404](https://wordpress.org/support/topic/new-page-returning-404/)
 *  Thread Starter [nikc](https://wordpress.org/support/users/nikc/)
 * (@nikc)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/new-page-returning-404/#post-331322)
 * Yes, it is writeable by WP, and I have recreated it several times with no avail.

Viewing 11 replies - 1 through 11 (of 11 total)