Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2004-12-16 10:38:00

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: [plugin] [ORPHAN] zem_rewrite: configurable clean URLs

Zem,

your test works. If I call <code>http://notes.andreas-kalt.de/asdfasdf</code> in the browser I’m being redirected to the root document.

However, another test for the plugin failed again.

This (and only this) is in my .htaccess file

<code>
RewriteEngine On
# Passthrough for existing files and directories
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) – [PT,L]

# Everything else should go through Textpattern
RewriteRule (.*) index.php

</code>

Last edited by andreas (2004-12-16 10:39:18)

Offline

#38 2004-12-16 12:54:20

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

Re: [plugin] [ORPHAN] zem_rewrite: configurable clean URLs

<em>andreas wrote:
<blockquote>“This (<strong>and only this</strong>) is in my .htaccess file”</blockquote></em>

Thanks for that, andreas.

Last edited by Destry (2004-12-16 12:55:05)

Offline

#39 2004-12-16 18:50:14

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: [plugin] [ORPHAN] zem_rewrite: configurable clean URLs

zem, I got it to work!

The problem was that there were still the placeholder files (that are used by the default TXP method of clean URLs) in the directory.

I had thought that if they’re not being called they wouldn’t do any harm but once I deleted them your plugin works. Great!

Now another question:

I have another site I’d like to use your plugin on. This site has been using URLs with IDs for a couple of weeks so I suppose some bookmarks and index files exist.

The current pattern is: www.rete-mirabile.net/section/ID/title

Is there a way to collectively redirect calls for these URLs to the ones I’m planning to use, i.e.

www.rete-mirabile.net/section/title ?

And: am I right assuming that the URL-only title is currently not supported by the plugin?

Offline

#40 2004-12-16 19:28:23

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: [plugin] [ORPHAN] zem_rewrite: configurable clean URLs

Another problem occured: I have three sections each with its own page template. If I use the plugin, they all use the default template but only when I call the section home page (/section/) and not when I call an article from that section.

I can’t make sense of this. Anyone? zem? Thanks a lot.

Offline

#41 2004-12-17 21:57:53

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: [plugin] [ORPHAN] zem_rewrite: configurable clean URLs

Andreas,

URL title permlinks should work with the current version, provided you don’t also expect clean category URLs to work. See this post for a quick explanation.

Regarding the article templates, what do your $uri_scheme settings look like? (the order might be important)


Alex

Offline

#42 2004-12-18 10:11:02

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: [plugin] [ORPHAN] zem_rewrite: configurable clean URLs

zem,

my pattern was this:

<code>
$uri_scheme[‘article’] = ‘{section}/{title}’;
$uri_scheme[‘article_alt’] = ‘{section}/{article}/’;
$uri_scheme[‘category’] = ‘{section}/{category}/’;
$uri_scheme[‘category_alt’] = ‘{category}/’;
$uri_scheme[‘section’] = ‘{section}/’;
</code>

Now I changed it to this:

<code>
$uri_scheme[‘article’] = ‘{section}/{title}’;
$uri_scheme[‘section’] = ‘{section}/’;
$uri_scheme[‘category’] = ‘{section}/{category}/’;
$uri_scheme[‘category_alt’] = ‘{category}/’;
</code>

The result is that section permalinks do use the page template I specified but now I can’t call articles anymore. Instead, the section list page is being displayed.

Last edited by andreas (2004-12-18 10:11:32)

Offline

#43 2004-12-18 23:49:39

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: [plugin] [ORPHAN] zem_rewrite: configurable clean URLs

{section}/{title} won’t work. It should be {section}/{url_title} for clean article URLs. You’ll also need to manually enter the URL title when you post each article.

Also bear in mind that {section}/{category} won’t work if you’re using the above scheme, because zem_rewrite can’t tell whether the URL ‘/foo/bar’ refers to ‘bar’ as an article title or as a category.


Alex

Offline

#44 2004-12-19 00:23:11

Turbo-G
Member
From: Würzburg, Germany
Registered: 2004-04-15
Posts: 27
Website

Re: [plugin] [ORPHAN] zem_rewrite: configurable clean URLs

To sum it up:

With zem_rewrite you can drop the article-ID from your article’s URLs. But then you have to define a url-title manually for every single article. If you forget to define one url_title, the permalink for this article won’t work.

Which makes it a little bit more difficult for me to update the URL-Design on my website which has almost 500 articles now … Wouldn’t it be a nice idea if somebody came up with a script that automatically copies the automatically generated urls into the sql-cells with the manual url-titles?

Does anyone understand my english here? :-)

update: Well, that’s exactly what Zem wrote a few minutes ago. :-)

Last edited by Turbo-G (2004-12-19 00:30:38)

Offline

#45 2004-12-19 08:27:58

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: [plugin] [ORPHAN] zem_rewrite: configurable clean URLs

Ok. I see.

Like Turbo-G, I already have a lot of articles that I’d need to edit manually for them to have a url-only title. For the moment, I’ll stop fumbling with zem_rewrite (brilliant plugin though it is) and wait what TXP v1.0 will have in store in the area of clean URLs. IIRC, Dean was talking about some features that zem_rewrite offers a while ago. Let’s hope that there will be a nice christmas present for us all!

Thanks, zem, for your help and the good work on this plugin.

Offline

#46 2004-12-19 11:03:39

JustinLow
Plugin Author
From: Singapore
Registered: 2004-04-25
Posts: 57
Website

Re: [plugin] [ORPHAN] zem_rewrite: configurable clean URLs

In anticipation of using this plugin, I wrote another little plugin that created a url_title for articles that don’t already have one.

It seems to work so far. See here.

Last edited by JustinLow (2004-12-19 11:25:16)


Justin

Offline

#47 2004-12-19 18:24:23

apsk121
Member
From: Punjab, India
Registered: 2004-09-02
Posts: 36
Website

Re: [plugin] [ORPHAN] zem_rewrite: configurable clean URLs

When I try installing I get :

<b>Parse error</b>: parse error, unexpected $ in <b>/tmp/phpGM7buO</b> on line <b>30</b>

Last edited by apsk121 (2004-12-19 18:25:22)

Offline

#48 2004-12-19 22:06:02

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: [plugin] [ORPHAN] zem_rewrite: configurable clean URLs

Sounds like something went wrong downloading the file. Try downloading again, and if you’re using 1rc1, paste the base64 encoded text into the “Install plugin” textarea rather than using the upload file option.


Alex

Offline

Board footer

Powered by FluxBB