isaacschlueter
Forum Replies Created
-
Forum: Plugins
In reply to: New Plugin: Cannonical URLOh, the plugin won’t be of much value if you don’t use pretty permalinks (it’d be kind of silly then.)
The value is that, even with mod_rewrite, a person still *can* go to
index.php?p=123
. In fact, I sometimes write non-standard single-post URIs in my own posts, simply because/p303
is less typing than/2005/10/sidebar-expando/
. However, if a user clicks on that link, or if a search engine stumbles across it, I still want them to go to the proper permalink URI instead.Hence, the plugin. ??
Doing these redirects with mod_rewrite would be impossible. The idea is to take ANY request for a single post, and redirect it to the cannonical permalink.
Forum: Fixing WordPress
In reply to: Use Permalonk for PagesYou could set the page stub to page1.html instead of page1.
Does that work?
Forum: Plugins
In reply to: Anyone recommend a a Link Tracker or StatsI highly recommend BAStats
https://asymptomatic.net/wp-hacksForum: Plugins
In reply to: Feed-Rewriting based on User-AgentTry this. Firefox will get the atom feed, and MSIE will get RSS2. Put it *before* the WordPress block:
#sniff the user agent
RewriteCond %{HTTP_USER_AGENT} firefox [NC]
#make sure that they're not already requesting the right thing.
RewriteCond %{REQUEST_FILENAME} !/feed/atom [NC]
#Rewrite it and start over to interpret the new URI.
RewriteRule ^(.*)/feed(/.*)?$ $1/feed/atom/ [N]
#sniff the UA string
RewriteCond %{HTTP_USER_AGENT} msie [NC]
#check that they're not already looking for the right thing.
RewriteCond %{REQUEST_FILENAME} !/feed/rss2 [NC]
#rewrite and start over.
RewriteRule ^(.*)/feed(/.*)?$ $1/feed/rss2/ [N]Note that this won’t work prior to Apache version 2, due to the greedy regex in the RewriteRule. However, since “feed” can be appended to so many different URIs, it’d be really tricky to solve the problem with mod_rewrite in an Apache 1.3 compatible way, and depend a lot on the specifics of your site setup.
Forum: Fixing WordPress
In reply to: mod_rewrite breaking everything except WP!You could add this rule outside the WP block:
RewriteCond %{REQUEST_FILENAME}/ -d
RewriteRule ^(.*)$ $1/ [L,R=301]You could also try the
N
flag instead ofR
, since you only need to *internally* resolve the request as a folder, and you may want to further rewrite requests to that folder (depending on what folder it is.)R
will send a 301 or 302 header, and the browser will actually make another request.Check out the mod_rewrite documentation for more information.
Forum: Fixing WordPress
In reply to: Different content on index.php/page/1/ & index.php/page/2/How about this?
<?php
if( is_home() && $_GET['paged'] <= 1 )
{
include('info.php');
}
?>If that gives you weird results, you could also try this instead:
<?php
global $paged;
if( is_home() && $paged <= 1 )
{
include('info.php');
}
?>Forum: Installing WordPress
In reply to: Althought mod_rewrite works -> 404-errorsForum: Installing WordPress
In reply to: Althought mod_rewrite works -> 404-errorsIf you are using Apache 1.3 and want to use
%category%
in your permalink (along with having working category and search feeds) you can use the plugin I made. It’s been working really well in a lot of different situations now. The only thing is that, for some reason that I have yet to work out, you can’t have both numeric items (like%year%
,%postid%
, etc) and%category%
in your permalinks at the same time.Forum: Everything else WordPress
In reply to: .htaccess and exceptions…Let’s say that your theme dir is
/wp-content/themes/peachy/
. Add a rule like this:RewriteCond /wp-content/themes/peachy/%{REQUESTFILENAME} -f [NC]
RewriteRule ^(.*)$ /wp-content/themes/peachy/$1 [L]The rule that you had won’t work because the request doesn’t match ^/$. If you changed that part to be ^.*$, then it’d work.
Forum: Fixing WordPress
In reply to: comment links redirect to same pageyou can add this line in your .htaccess (before the #BEGIN WORDPRESS bit, if you use pretty permalinks)
DirectoryIndex index.php index.html index.htm default.html default.html
Forum: Fixing WordPress
In reply to: comment links redirect to same pageAh.
Your permalinks don’t go anywhere. I noticed that you have a new layout. That is the problem. https://deathbloom.net/jackie/wp.php?p=17#respond works just fine.
Examine the difference between your index.php and wp.php files. Look for calls to
is_single()
.Better yet, just start with wp.php, save it with a different filename, and then modify it bit by bit until it matches your desired output. But DON’T get rid of the permalink/is_single stuff, because that’s the source of your current problem.
Forum: Plugins
In reply to: BAstats ErrorHere’s a bit of a hack/patch that will make the problem go away:
Open up BAStats_logger.php and go to line 114. It should be this:
if(in_array('log_spam', $options) && in_array('referer_spam', $settings))
{Change that to this:
if(!is_array($options))$options = array();
if(!is_array($settings))$settings = array();
if(in_array('log_spam', $options) && in_array('referer_spam', $settings))
{Still have the problem?
Forum: Requests and Feedback
In reply to: B2Evo ImporterMRT and I have tweaked this script a bit more, and added some more functionality to it.
You can get it from either https://themikecam.com/downloads/import-b2evolution.php.txt or https://isaacschlueter.com/download/import-b2evolution.php
Forum: Fixing WordPress
In reply to: ?tegory% in Permalink – Actually Possible?Forum: Fixing WordPress
In reply to: What permalink structure do you use?If you want to use %category% in your permalinks with Apache 1.3, check out https://isaacschlueter.com/plugins/i-made/lucky-13-rewrite/