permalinks issue
-
Pat
permalinks issue
I use the article title as the permalinks for one of my sites
there seems to be a problem.
I can get to an article from many different ways.
For example
archives/01_.html
works
as does any combination of words or marks after it,
i.e.,
archives/01_test.html
archives/01_article-name.html
archives/01_article_name.html
archives/01_boo_.html
the variations are endless.
How do I change it so that the only url that works is
archives/01_article_name.html
this is problematic for search engines who can pick up multiple urls for the same page anytime someone uses an improper url
there seems to be a problem.
I can get to an article from many different ways.
For example
archives/01_.html
works
as does any combination of words or marks after it,
i.e.,
archives/01_test.html
archives/01_article-name.html
archives/01_article_name.html
archives/01_boo_.html
the variations are endless.
How do I change it so that the only url that works is
archives/01_article_name.html
this is problematic for search engines who can pick up multiple urls for the same page anytime someone uses an improper url
Looking in the .htaccess, I see that the rewrite rule copies the entire article id, name, and path (if any) to the query URL. That means Serendipity actually gets the whole string; it just throws away everything after the ID.
In short, the rewrite rules indicate that Serendipity only cares about the article id, not the name. To make it care about the id and the name will require some coding. Earlier posts on permalinks imply that you can omit the id and use only the name in the configuration, but that this causes a big performance problem.
If all you want is a single working URL, you could allow only the numbers. Your permalink wouldn't be too pretty, but you would have the unique URL.
Would change to
and the url archives/01_article-name.html would change to archives/01.html. (Garvin: the double slashes should exactly duplicate what is provided by the original rewrite rule. I don't know if that's intentional. It would allow archives01.html to work, but... double slashes for everything else?)
You will want to keep a copy of your .htaccess, in case I've messed something up.
This seems like a reasonable behavior to me. There are two identifiers, after all, and I wouldn't want a mistyped ID or name to completely baffle BOTH my readers. I suppose Serendipity could redirect to a search page if there's some kind of discrepancy.
In short, the rewrite rules indicate that Serendipity only cares about the article id, not the name. To make it care about the id and the name will require some coding. Earlier posts on permalinks imply that you can omit the id and use only the name in the configuration, but that this causes a big performance problem.
If all you want is a single working URL, you could allow only the numbers. Your permalink wouldn't be too pretty, but you would have the unique URL.
Code: Select all
RewriteRule ^archives([/A-Za-z0-9]+)\.html index.php?url=/archives/$1.html [L,QSA]
Code: Select all
RewriteRule ^archives/([0-9]+)\.html index.php?url=/archives//$1.html [L,QSA]
You will want to keep a copy of your .htaccess, in case I've messed something up.
This seems like a reasonable behavior to me. There are two identifiers, after all, and I wouldn't want a mistyped ID or name to completely baffle BOTH my readers. I suppose Serendipity could redirect to a search page if there's some kind of discrepancy.
-
Pat
Hi,
Thanks, very much. I settled on
RewriteRule ^(article([0-9]+)\.html$) index.php?/$1 [L,QSA]
to get article#.html
i.e., article1.html
article2.html
etc.
now, for the search engines, because I have 200 articles alerady, I need to find a way to do a 301 permanent redirect or rewrite for all the old urls to the new urls so I do not lose any page rank and do not get duplicate content penalities.
I've had these articles up for 2 years with the old urls (and their funky different versions) for two years now.
the rewrite would be something like
RewriteRule article1.html archives/1_(.*)
but I'm not exactly sure how to do that one.
Thanks, very much. I settled on
RewriteRule ^(article([0-9]+)\.html$) index.php?/$1 [L,QSA]
to get article#.html
i.e., article1.html
article2.html
etc.
now, for the search engines, because I have 200 articles alerady, I need to find a way to do a 301 permanent redirect or rewrite for all the old urls to the new urls so I do not lose any page rank and do not get duplicate content penalities.
I've had these articles up for 2 years with the old urls (and their funky different versions) for two years now.
the rewrite would be something like
RewriteRule article1.html archives/1_(.*)
but I'm not exactly sure how to do that one.
-
Pat
I'm getting close with
RedirectMatch 301 /archives/(.*) http://domain.com/article$1.html
but can't seem to get it perfect
RedirectMatch 301 /archives/(.*) http://domain.com/article$1.html
but can't seem to get it perfect
-
Pat
I'm getting ever so close..
with
RedirectMatch 301 archives/([0-9]+) http://domain.com/article$1.html
I do get the redirect I am looking for. However, every url now ends in a query string ?url=archive
Please help, I need to get rid of the query string
with
RedirectMatch 301 archives/([0-9]+) http://domain.com/article$1.html
I do get the redirect I am looking for. However, every url now ends in a query string ?url=archive
Please help, I need to get rid of the query string
Pat,
I'm afraid I don't understand the problem very well. I think you want to change .../archives/01_article_name.html to archive01.html, with a 301 redirect.
I must also further apologize for not knowing about 301 redirect, but you've gotten close enough for me to take it the rest of the way (with my 1337 knowledge of regexp).
I think you want:
You can add any additional characters you think you might need (_-&%) inside the []. The period might need to be escaped (\.), but it should remain there so any .html will be modified, too. If you only want to redirect .html pages, you're looking for:
Good luck!
Judebert
I'm afraid I don't understand the problem very well. I think you want to change .../archives/01_article_name.html to archive01.html, with a 301 redirect.
I must also further apologize for not knowing about 301 redirect, but you've gotten close enough for me to take it the rest of the way (with my 1337 knowledge of regexp).
I think you want:
Code: Select all
RedirectMatch 301 archives/([0-9]+)[A-Za-z0-9/.]* http://domain.com/article$1.html Code: Select all
RedirectMatch 301 archives/([0-9]+)[A-Za-z0-9/]*\.html http://domain.com/article$1.htmlJudebert
-
Guest
"I'm afraid I don't understand the problem very well. I think you want to change .../archives/01_article_name.html to archive01.html"
1. original articles were /archives/01_file_name.html
problem duplicate content from variations on that url, i.e.,
/archives/01.html etc
2. solution change .htaccess to make all article urls
article1.html
3. problem all the old
/archives/01_article_name.html articles are still on the site creating even more duplicate content problems
4. solution - need to redirect all the articles in the /archives/ to the new url
the solution you suggested
RedirectMatch 301 archives/([0-9]+)[A-Za-z0-9/.]* http://domain.com/article$1.html
gave the same results as my redirect
RedirectMatch 301 archives/([0-9]+) http://domain.com/article$1.html
it works except all the articles now go to article1.html?url=/archive
the second solution you offered
RedirectMatch 301 archives/([0-9]+)[A-Za-z0-9/]*\.html http://domain.com/article$1.html
does nothing...the old article urls still show up.
At issue is the fact that I don't know why the query string ?url=/archive is appended to every redirect
the only thing I can see that is related is a similar rewrite rule:
RewriteRule ^archive/? index.php?url=/archive [L,QSA]
My .htaccess looks like
# BEGIN s9y
ErrorDocument 404 /index.php
ErrorDocument 410 /error1.php
DirectoryIndex /index.php
php_value session.use_trans_sid 0
php_value register_globals off
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.domain\.com
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]
RewriteBase /
RewriteRule ^(article([0-9]+)\.html$) index.php?/$1 [L,QSA]
RewriteRule ^(authors/([0-9]+)-[0-9a-z\.\_!;,\+\-]+) index.php?/$1 [L,QSA]
RewriteRule ^(feeds/categories/([0-9;]+)-[0-9a-z\.\_!;,\+\-]+\.rss) index.php?/$1 [L,QSA]
RewriteRule ^({PAT_PERMALINK_FEEDAUTHORS}) index.php?/$1 [L,QSA]
RewriteRule ^(categories/([0-9;]+)-[0-9a-z\.\_!;,\+\-]+) index.php?/$1 [L,QSA]
RewriteRule ^archives([/A-Za-z0-9]+)\.html index.php?url=/archives/$1.html [L,QSA]
RewriteRule ^([0-9]+)[_\-][0-9a-z_\-]*\.html index.php?url=$1-article.html [L,NC,QSA]
RewriteRule ^feeds/(.*) index.php?url=/feeds/$1 [L,QSA]
RewriteRule ^unsubscribe/(.*)/([0-9]+) index.php?url=/unsubscribe/$1/$2 [L,QSA]
RewriteRule ^approve/(.*)/(.*)/([0-9]+) index.php?url=approve/$1/$2/$3 [L,QSA]
RewriteRule ^delete/(.*)/(.*)/([0-9]+) index.php?url=delete/$1/$2/$3 [L,QSA]
RewriteRule ^(admin|entries)(/.+)? index.php?url=admin/ [L,QSA]
RewriteRule ^archive/? index.php?url=/archive [L,QSA]
RewriteRule ^(index|atom[0-9]*|rss|b2rss|b2rdf).(rss|rdf|rss2|xml) rss.php?file=$1&ext=$2
RewriteRule ^(plugin|plugin)/(.*) index.php?url=$1/$2 [L,QSA]
RewriteRule ^search/(.*) index.php?url=/search/$1 [L,QSA]
RewriteRule ^(serendipity\.css|serendipity_admin\.css) index.php?url=/$1 [L,QSA]
RewriteRule ^index\.(html?|php.+) index.php?url=index.html [L,QSA]
RewriteRule ^htmlarea/(.*) htmlarea/$1 [L,QSA]
RewriteRule (.*\.html?) index.php?url=/$1 [L,QSA]
RedirectMatch gone archives/(.*)
<Files *.tpl.php>
deny from all
</Files>
<Files *.tpl>
deny from all
</Files>
<Files *.sql>
deny from all
</Files>
<Files *.inc.php>
deny from all
</Files>
<Files *.db>
deny from all
</Files>
# END s9y
---------------
I am currently using RedirectMatch gone archives/(.*)
to 410 the articles in /archives/, but that is insufficient because doing so means I lose all my search engine rankings by saying those files no longer exist. Translated that means I'm back down to zero traffic after two years of work.
So, I need a way to redirect the old files to the new urls so that I do not lose my traffic.
1. original articles were /archives/01_file_name.html
problem duplicate content from variations on that url, i.e.,
/archives/01.html etc
2. solution change .htaccess to make all article urls
article1.html
3. problem all the old
/archives/01_article_name.html articles are still on the site creating even more duplicate content problems
4. solution - need to redirect all the articles in the /archives/ to the new url
the solution you suggested
RedirectMatch 301 archives/([0-9]+)[A-Za-z0-9/.]* http://domain.com/article$1.html
gave the same results as my redirect
RedirectMatch 301 archives/([0-9]+) http://domain.com/article$1.html
it works except all the articles now go to article1.html?url=/archive
the second solution you offered
RedirectMatch 301 archives/([0-9]+)[A-Za-z0-9/]*\.html http://domain.com/article$1.html
does nothing...the old article urls still show up.
At issue is the fact that I don't know why the query string ?url=/archive is appended to every redirect
the only thing I can see that is related is a similar rewrite rule:
RewriteRule ^archive/? index.php?url=/archive [L,QSA]
My .htaccess looks like
# BEGIN s9y
ErrorDocument 404 /index.php
ErrorDocument 410 /error1.php
DirectoryIndex /index.php
php_value session.use_trans_sid 0
php_value register_globals off
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.domain\.com
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]
RewriteBase /
RewriteRule ^(article([0-9]+)\.html$) index.php?/$1 [L,QSA]
RewriteRule ^(authors/([0-9]+)-[0-9a-z\.\_!;,\+\-]+) index.php?/$1 [L,QSA]
RewriteRule ^(feeds/categories/([0-9;]+)-[0-9a-z\.\_!;,\+\-]+\.rss) index.php?/$1 [L,QSA]
RewriteRule ^({PAT_PERMALINK_FEEDAUTHORS}) index.php?/$1 [L,QSA]
RewriteRule ^(categories/([0-9;]+)-[0-9a-z\.\_!;,\+\-]+) index.php?/$1 [L,QSA]
RewriteRule ^archives([/A-Za-z0-9]+)\.html index.php?url=/archives/$1.html [L,QSA]
RewriteRule ^([0-9]+)[_\-][0-9a-z_\-]*\.html index.php?url=$1-article.html [L,NC,QSA]
RewriteRule ^feeds/(.*) index.php?url=/feeds/$1 [L,QSA]
RewriteRule ^unsubscribe/(.*)/([0-9]+) index.php?url=/unsubscribe/$1/$2 [L,QSA]
RewriteRule ^approve/(.*)/(.*)/([0-9]+) index.php?url=approve/$1/$2/$3 [L,QSA]
RewriteRule ^delete/(.*)/(.*)/([0-9]+) index.php?url=delete/$1/$2/$3 [L,QSA]
RewriteRule ^(admin|entries)(/.+)? index.php?url=admin/ [L,QSA]
RewriteRule ^archive/? index.php?url=/archive [L,QSA]
RewriteRule ^(index|atom[0-9]*|rss|b2rss|b2rdf).(rss|rdf|rss2|xml) rss.php?file=$1&ext=$2
RewriteRule ^(plugin|plugin)/(.*) index.php?url=$1/$2 [L,QSA]
RewriteRule ^search/(.*) index.php?url=/search/$1 [L,QSA]
RewriteRule ^(serendipity\.css|serendipity_admin\.css) index.php?url=/$1 [L,QSA]
RewriteRule ^index\.(html?|php.+) index.php?url=index.html [L,QSA]
RewriteRule ^htmlarea/(.*) htmlarea/$1 [L,QSA]
RewriteRule (.*\.html?) index.php?url=/$1 [L,QSA]
RedirectMatch gone archives/(.*)
<Files *.tpl.php>
deny from all
</Files>
<Files *.tpl>
deny from all
</Files>
<Files *.sql>
deny from all
</Files>
<Files *.inc.php>
deny from all
</Files>
<Files *.db>
deny from all
</Files>
# END s9y
---------------
I am currently using RedirectMatch gone archives/(.*)
to 410 the articles in /archives/, but that is insufficient because doing so means I lose all my search engine rankings by saying those files no longer exist. Translated that means I'm back down to zero traffic after two years of work.
So, I need a way to redirect the old files to the new urls so that I do not lose my traffic.
-
Pat
Before going to bed I tried editing
functions_permalinks.inc.php
line 259 and 260
if (stristr($struct, '%id%') === FALSE) {
$url = preg_replace('@^(' . preg_quote($serendipity['serendipityHTTPPath'], '@') . '(' . preg_quote($serendipity['indexFile'], '@') . ')?\??(url=)?/?)([^&?]+).*@', '\4', $url);
I deleted them because it looked as if these were the lines that appended the "?url=/archive" to the end of each entry.
The result was going to the same url
article1.html?url=/archive
but the results said
"no entries to print" as if the entry never existed
so, that did not work and I reloaded the original
functions_permalinks.inc.php
functions_permalinks.inc.php
line 259 and 260
if (stristr($struct, '%id%') === FALSE) {
$url = preg_replace('@^(' . preg_quote($serendipity['serendipityHTTPPath'], '@') . '(' . preg_quote($serendipity['indexFile'], '@') . ')?\??(url=)?/?)([^&?]+).*@', '\4', $url);
I deleted them because it looked as if these were the lines that appended the "?url=/archive" to the end of each entry.
The result was going to the same url
article1.html?url=/archive
but the results said
"no entries to print" as if the entry never existed
so, that did not work and I reloaded the original
functions_permalinks.inc.php
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Why are you giving yourself such a hard time? 
Just configure the serendipity permalinks within the Configuration and remove the numbers from the permalink style! Then articles are referenced without their number, and require the exact permalink just as you want...
Best regards,
Garvin
Just configure the serendipity permalinks within the Configuration and remove the numbers from the permalink style! Then articles are referenced without their number, and require the exact permalink just as you want...
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
Pat
Gavin,
I'm giving myself a hard time because I've been using Serendipity on this site for two years.
I just discovered that over the course of these two years, there have been numerous erros made in links to the articles because you can basically use any name with the article ID.
The result is that google is showing many duplicate articles and I've got a penalty. I'm losing big money.
Basically, that's why I'm giving myself such a hard time. I thought Serendipity was good code for setting up a profitable website.
I'm trying to find a way to resolve all the dupicate content issues by now resolving all of the articles to one single url by doing a 301 redirect.
What I can not figure out is how to get rid of the query string following the redirect I've done.
You see
article1.html and the redirected
article1.html?url=archive/
are still 2 different urls and would still trigger a duplicate content penalty.
I dropped PostNuke in favor of Serendipity because the PostNuke people were happy with their code regardless of how poorly it performed in the Search Engines.
I hope that you and the other Serendipity developers would take seriously the importance of have a product that is search engine friendly.
And...there is more to being a search engine friendly blog than having a built in permalink system.
In fact, any publisher will tell you that they run far away from any content management system or blog produces multiple copies of the same page under different urls, which is the problem I've run into with Serendipity over the course of two years.
I'm giving myself a hard time because I've been using Serendipity on this site for two years.
I just discovered that over the course of these two years, there have been numerous erros made in links to the articles because you can basically use any name with the article ID.
The result is that google is showing many duplicate articles and I've got a penalty. I'm losing big money.
Basically, that's why I'm giving myself such a hard time. I thought Serendipity was good code for setting up a profitable website.
I'm trying to find a way to resolve all the dupicate content issues by now resolving all of the articles to one single url by doing a 301 redirect.
What I can not figure out is how to get rid of the query string following the redirect I've done.
You see
article1.html and the redirected
article1.html?url=archive/
are still 2 different urls and would still trigger a duplicate content penalty.
I dropped PostNuke in favor of Serendipity because the PostNuke people were happy with their code regardless of how poorly it performed in the Search Engines.
I hope that you and the other Serendipity developers would take seriously the importance of have a product that is search engine friendly.
And...there is more to being a search engine friendly blog than having a built in permalink system.
In fact, any publisher will tell you that they run far away from any content management system or blog produces multiple copies of the same page under different urls, which is the problem I've run into with Serendipity over the course of two years.
Oh, I care. But I'm not getting any of that "big money" once I solve your problem, am I? And it won't change the money I get one bit if publishers run away or towards Serendipity, will it? I work this stuff because I'm interested in it, and that last post isn't really helping me be more interested in your problem.
What Garvin said is correct: remove the %id% from your permalinks, and your problem -- as stated -- is solved. You may take a performance hit as Serendipity goes to the database to look up the URL, since it won't have an ID it can use, but them's the breaks.
Looking at that piece of code from functions_permalinks.inc.php, I think we need to change the configuration, too.
In fact, the more I look at it, the more it seems like that's going to be a big part of the solution. We get a URL like "archive/01-whatever.html"; "RewriteRule ^archives([/A-Za-z0-9]+)\.html index.php?url=/archives/$1.html [L,QSA] " changes that to "index.php?url=/archives/01-whatever.html" and ends processing (because of the [L]). Serendipity checks its permalinks, discovers that the "Permalink Entry URL Structure archives/%id%-%title%.html" matches, that it has a %id%, and gets entry id 01 and displays it.
When we get a URL like "article01.html", "RewriteRule ^(article([0-9]+)\.html$) index.php?/$1 [L,QSA]" changes it to "index.php?/article01.html" and ends processing. Serendipity checks its permalinks, discovers that it has no idea what we're talking about, and adds the "?url=/archive", presumably from functions_permalinks.inc.php.
I'd probably back up the .htaccess, change the Serendipity config so the Entry permalink reads "article%id%.html", save the resulting .htaccess, and restore my .htaccess. Garvin please confirm: That should cause Serendipity to use the new article01.html when it displays links on your pages.
I assume search engines (and people with bookmarks; let's not forget Poland!) will attempt to access the articles as "/archives/01-name.html". Our RedirectMatch should permanently redirect them to "/article01.html". That would look like:
Since we don't anchor the end, anything that comes after the ID number will match, too. It'll have to go above the RewriteRules. When their browser/spider comes around again for the redirected page, our first RewriteRule converts it to something Serendipity can understand: index.php?/article01.html. (This same RewriteRule was probably produced when we changed the Serendipity config file). Since article%id%.html is now part of the Serendipity config, it'll recognize it and serve up entry ID 01. Anybody using the article01.html link will get this RewriteRule directly, and therefore the correct article. Anybody using a mistyped archive rule gets the redirect.
If that works, we can then remove the other archive RewriteRules from the .htaccess, since they'll never be hit. Then we can see if the Serendipity-generated "article" rules are any use to us, and add them if so.
I hope this is all understandable enough for you to use. I hope I'm correct. I'm not a big mod_rewrite guru; I'm just a regexp guy, interested in this kind of stuff, deep-learning the web, trying to help you out. For free. If this doesn't work for you, tell me what went wrong, and I'll try again tomorrow. If you provide a few examples of the behavior you desire, I'll see what I can do to duplicate it.
What Garvin said is correct: remove the %id% from your permalinks, and your problem -- as stated -- is solved. You may take a performance hit as Serendipity goes to the database to look up the URL, since it won't have an ID it can use, but them's the breaks.
Are ALL articles going to article1.html?url=archive/, or are the article numbers being preserved?it works except all the articles now go to article1.html?url=/archive
Looking at that piece of code from functions_permalinks.inc.php, I think we need to change the configuration, too.
In fact, the more I look at it, the more it seems like that's going to be a big part of the solution. We get a URL like "archive/01-whatever.html"; "RewriteRule ^archives([/A-Za-z0-9]+)\.html index.php?url=/archives/$1.html [L,QSA] " changes that to "index.php?url=/archives/01-whatever.html" and ends processing (because of the [L]). Serendipity checks its permalinks, discovers that the "Permalink Entry URL Structure archives/%id%-%title%.html" matches, that it has a %id%, and gets entry id 01 and displays it.
When we get a URL like "article01.html", "RewriteRule ^(article([0-9]+)\.html$) index.php?/$1 [L,QSA]" changes it to "index.php?/article01.html" and ends processing. Serendipity checks its permalinks, discovers that it has no idea what we're talking about, and adds the "?url=/archive", presumably from functions_permalinks.inc.php.
I'd probably back up the .htaccess, change the Serendipity config so the Entry permalink reads "article%id%.html", save the resulting .htaccess, and restore my .htaccess. Garvin please confirm: That should cause Serendipity to use the new article01.html when it displays links on your pages.
I assume search engines (and people with bookmarks; let's not forget Poland!) will attempt to access the articles as "/archives/01-name.html". Our RedirectMatch should permanently redirect them to "/article01.html". That would look like:
Code: Select all
RedirectMatch 301 ^archives/([0-9]*) article$1.htmlIf that works, we can then remove the other archive RewriteRules from the .htaccess, since they'll never be hit. Then we can see if the Serendipity-generated "article" rules are any use to us, and add them if so.
I hope this is all understandable enough for you to use. I hope I'm correct. I'm not a big mod_rewrite guru; I'm just a regexp guy, interested in this kind of stuff, deep-learning the web, trying to help you out. For free. If this doesn't work for you, tell me what went wrong, and I'll try again tomorrow. If you provide a few examples of the behavior you desire, I'll see what I can do to duplicate it.
-
Guest
"Oh, I care. But I'm not getting any of that "big money" once I solve your problem, am I? And it won't change the money I get one bit if publishers run away or towards Serendipity, will it? I work this stuff because I'm interested in it, and that last post isn't really helping me be more interested in your problem. "
You miss my point, although I may not have made it as precisely as I could.
I am losing money on the deal and big money, and that is a problem for me. However, my bigger point was to bring up how you guys do your work.
If you are interested in building a premier blog, whether or not you make any money out of it, that means seeing the big internet picture. It means building a blog that works for everybody.
The big picture includes building a blog that is search engine friendly...a blog that helps people communicate if that is all they desire..a blog that helps people make money, if that is what they desire. A blog that fits the internet of the day and not merely a blog that has some cool coding tricks.
I mean no offense when I say I've met many coders who know very little about the internet except the code on their project.
My point is that your project, Serendipity, will improve as you improve your knowledge of the internet and publishing world as well as the needs of its many users.
What else might be in it for you to help? Well, for example, I'm part of a private (500 member webmaster forum). I'm one of the CMS and blog experts and fellow members come to me for my advice.
If you consider word of mouth from these 500 members to their friends and family, that's many potential Serendipity users, or not. That many or may not help you, but it helps your project.
Finally, you help is not just helping me, it's helping all types of people who may have similar issues as myself and may or may not be able to reciprocate.
I don't know if any of the developers make money from their Serendipity work, however, I assume if you do not, you are at least trying to build a resume for future employment. Afterall, if we don't have a trustfund, we have to make money somehow to live.
Additionally, I do not expect any money when I post my solutions to commonly asked problems on this forum. I recognize that Serendipity is an open source project that works when people donate their expertise, and I have done so on this forum.
I've been a publisher, editor, webmaster, hacker, jack of all trades for over 9 years now. My academic background is International Relations. So you can see I'm not a code expert, I just use all my knowledge to put together a nice product that I thought would run best on Serendipity.
But enough of that, I'm not trying to get into a fight.
Your eplanation of the how the permalinks works was very good and I think I have a better understanding of the issues involved.
You asked, "Are ALL articles going to article1.html?url=/archive, or are the article numbers being preserved? "
All the article numbers are being preserved. ?url=archive gets appended to all of the redirects. i.e.,
article1.html?url=/archive
article2.html?url=/archive
so, your explanation sounds like it provides me a way to explore some solutions and I thank-you for it.
You miss my point, although I may not have made it as precisely as I could.
I am losing money on the deal and big money, and that is a problem for me. However, my bigger point was to bring up how you guys do your work.
If you are interested in building a premier blog, whether or not you make any money out of it, that means seeing the big internet picture. It means building a blog that works for everybody.
The big picture includes building a blog that is search engine friendly...a blog that helps people communicate if that is all they desire..a blog that helps people make money, if that is what they desire. A blog that fits the internet of the day and not merely a blog that has some cool coding tricks.
I mean no offense when I say I've met many coders who know very little about the internet except the code on their project.
My point is that your project, Serendipity, will improve as you improve your knowledge of the internet and publishing world as well as the needs of its many users.
What else might be in it for you to help? Well, for example, I'm part of a private (500 member webmaster forum). I'm one of the CMS and blog experts and fellow members come to me for my advice.
If you consider word of mouth from these 500 members to their friends and family, that's many potential Serendipity users, or not. That many or may not help you, but it helps your project.
Finally, you help is not just helping me, it's helping all types of people who may have similar issues as myself and may or may not be able to reciprocate.
I don't know if any of the developers make money from their Serendipity work, however, I assume if you do not, you are at least trying to build a resume for future employment. Afterall, if we don't have a trustfund, we have to make money somehow to live.
Additionally, I do not expect any money when I post my solutions to commonly asked problems on this forum. I recognize that Serendipity is an open source project that works when people donate their expertise, and I have done so on this forum.
I've been a publisher, editor, webmaster, hacker, jack of all trades for over 9 years now. My academic background is International Relations. So you can see I'm not a code expert, I just use all my knowledge to put together a nice product that I thought would run best on Serendipity.
But enough of that, I'm not trying to get into a fight.
Your eplanation of the how the permalinks works was very good and I think I have a better understanding of the issues involved.
You asked, "Are ALL articles going to article1.html?url=/archive, or are the article numbers being preserved? "
All the article numbers are being preserved. ?url=archive gets appended to all of the redirects. i.e.,
article1.html?url=/archive
article2.html?url=/archive
so, your explanation sounds like it provides me a way to explore some solutions and I thank-you for it.
-
Pat
again, maybe my previous post was confusing.
I did change the .htacces as described and all the articles on the site do point to
article1.html
article2.html etc.
the rewrite rules worked perfectly.
The problem is that even thought the rewrite rules worked perfectly, AND all the articles have the url I want, the former urls, i.e,
archives/1_article_name.html
still show up if you have those urls. They are hidden from view on the blog, but they show up because they are hard coded into the files.
Assume I'll never use the /archives/ folder.
What I want to do is redirect all those now hidden urls in the blog (and they are not hidden in the search engines because that's what people have been using for 2 years) to the more stable
article#.html form.
The only time the urls show up with the appended query string ?url=/archive is when I do the
RedirectMatch 301 in my .htaccess
That's what I'm working on.
I did change the .htacces as described and all the articles on the site do point to
article1.html
article2.html etc.
the rewrite rules worked perfectly.
The problem is that even thought the rewrite rules worked perfectly, AND all the articles have the url I want, the former urls, i.e,
archives/1_article_name.html
still show up if you have those urls. They are hidden from view on the blog, but they show up because they are hard coded into the files.
Assume I'll never use the /archives/ folder.
What I want to do is redirect all those now hidden urls in the blog (and they are not hidden in the search engines because that's what people have been using for 2 years) to the more stable
article#.html form.
The only time the urls show up with the appended query string ?url=/archive is when I do the
RedirectMatch 301 in my .htaccess
That's what I'm working on.
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi Pat!
No offense, but if you make Money with Serendipity, you could've spent some money on a coder who made the permalinks right in first time, or to advise you on how to best pay attention on permalinks? No offense, but it seems you'reblaming Serendipity to loose money, whereas Serendipity is a product you didn't pay for to create you money.
So you should be able to solve your problem very easily with the permalink setup of s9y, and by creating a custom .htaccess file that redirects your "invalid" permalinks to the new structure via RewriteRules:
You need to also change the permalink strucutre in your serendipity configuration to no longer incloude the ID in yourarticle; serendipity uses exactly that setup to build the permalinks that are used within your article(s). So those do not change just by redirection, they only change if you change theinternal structure.
Best regards and HTH,
Garvin
P.S.: Oh, sorry, I skipped the last 3 posts- didn't see them before. Some things may have touched by judebert,but I'm a bit short on timeto investigate this througly. But just to say it: What you want to do can be done with Serendipity, it's part of our concept for some longer time. It's only harder that you only start toapply it now to your blog and not earlier on, and this is why you'll have to edit your .htaccess file manually for redirecting "old, invalid" matches.
No offense, but if you make Money with Serendipity, you could've spent some money on a coder who made the permalinks right in first time, or to advise you on how to best pay attention on permalinks? No offense, but it seems you'reblaming Serendipity to loose money, whereas Serendipity is a product you didn't pay for to create you money.
I think there is no problem, you can achieve both "title-irrelevant" permalinks, and "title-relevant" permalinks with Serendipity.I hope that you and the other Serendipity developers would take seriously the importance of have a product that is search engine friendly.
Actually the way of title-independent permalinksis both a technique that saves performance as well as a technique that several users appreciatedin the past, because old links would still work after changing the title.In fact, any publisher will tell you that they run far away from any content management system or blog produces multiple copies of the same page under different urls, which is the problem I've run into with Serendipity over the course of two years.
So you should be able to solve your problem very easily with the permalink setup of s9y, and by creating a custom .htaccess file that redirects your "invalid" permalinks to the new structure via RewriteRules:
Code: Select all
RewriteEngine On
RewriteRule ^archives/23-invalid-title.html$ /archives/23-valid-title.html [L,QSA]
Best regards and HTH,
Garvin
P.S.: Oh, sorry, I skipped the last 3 posts- didn't see them before. Some things may have touched by judebert,but I'm a bit short on timeto investigate this througly. But just to say it: What you want to do can be done with Serendipity, it's part of our concept for some longer time. It's only harder that you only start toapply it now to your blog and not earlier on, and this is why you'll have to edit your .htaccess file manually for redirecting "old, invalid" matches.
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/