Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2004-12-15 13:01:30

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

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

Hi zem. I’m finally getting around to your plugin. (All roads lead to zem’s house.) I have a real stoooooooooooooopid question…

When I add your Rewrite rules to the .htaccess file, do I clear out all the other content in that file in the process (i.e., all the content in there from the TxP install)? If not, what do I keep?

(Wouldn’t hurt to add a comment about this in your instructions for non-devs like me. Just a thought.)

Offline

#32 2004-12-15 17:50:14

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

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

Zem,

my (subdomain) site is in a subdirectory of my html directory so it is on the same level as the maindomain site and there is no extra .htaccess file.

Offline

#33 2004-12-15 18:24:44

e-sven
Archived Plugin Author
From: Berlin, Germany
Registered: 2004-11-12
Posts: 17
Website

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

It would be really great to have urls like:

/section/parent_category/child_category/title

Or is this already possible? Another thing is, that it is still impossible to create urls without id’s.


Sven
<bc />

Offline

#34 2004-12-15 18:30:09

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

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

With zem’s plugin URLs without IDs are possible. Just delet /{article}/ from the plugin configuration code.

Offline

#35 2004-12-15 21:02:39

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

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

It doesn’t yet do nested parent/child categories, but it’s a possibility for the future.


Alex

Offline

#36 2004-12-15 21:06:17

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

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

Andreas,

So the only .htaccess file is in the subdomain directory? Is there anything in it other than the rewriterules?

Can you confirm that a trivial redirect works, i.e:

RewriteEngine on
RewriteRule asdfasdf http://example.com/ [R,L]

..and fetch http://yourdomain.com/asdfasdf


Alex

Offline

#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

Board footer

Powered by FluxBB