Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#151 2005-02-11 20:39:43

bpk
New Member
Registered: 2005-01-27
Posts: 5

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

Thanks tommyhilfiga. I was under the impression that zem_rewrite did not require such files?? I didn’t see it mentioned in the documentation. I could have missed something though. I’ll double check.

Thanks.

Offline

#152 2005-02-11 23:29:01

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

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

zem_rewrite doesn’t require the section placeholder files. In fact it won’t work if you use them.


Alex

Offline

#153 2005-02-11 23:30:37

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

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

bpk,

That sounds like it could be caused by this bug.


Alex

Offline

#154 2005-02-11 23:30:56

The Safety Inspector
Member
From: London, UK
Registered: 2004-06-22
Posts: 32
Website

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

zem_rewrite looks nice. however, i have followed all of the steps exactly as outlined, and i am still having problems linking to anything. the zem_permlink displays a semantically correct link, and the URL seems correct, but i keep getting the followiing error:

Not Found
The requested URL /article/Hearth/5/lorem-ipsum was not found on this server.

you can go to <a href=“http://www.digital-hearth.com”>www.digital-hearth.com</a> and see that all of the links are giving the same error message. perhaps there’s something that isn’t happening somewhere along the line.

has anybody else experienced this?

thanks for any suggestions.

Offline

#155 2005-02-11 23:39:54

tommyhilfiga
New Member
Registered: 2005-02-06
Posts: 4

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

> zem wrote:

> zem_rewrite doesn’t require the section placeholder files. In fact it won’t work if you use them.

<del>@ zem: that really is odd you say that, as I was having the exact problem as bpk had, and I resolved it by adding those txt file…</del>

maybe my webserver didn’t regconize the changes in my .htaccess when I tried it…
anyway, that’s why I’m waiting for txp 1 to get the new design online with my website…

@ bpk : sorry for giving you the wrong info. <del>but it worked for me…</del> sorry mate

Last edited by tommyhilfiga (2005-02-11 23:43:41)

Offline

#156 2005-02-12 00:21:40

bpk
New Member
Registered: 2005-01-27
Posts: 5

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

zem: Thanks! But unfortunately, it didn’t solve my problem. Here is what I did as per the bug report…

The solution seems to be to shift line 57 down a couple of lines, after “extract($pretext)”.

After making the above change, all my links still work using this original scheme…

http://mydomain.com/?s=news

But now when I try…

http://mydomain.com/news/

the default home page loads (as it did before), but without the stylesheet. The link to the stylesheet is…

textpattern/css.php?s=default

So the the modification to publish.php didn’t work.

Thanks so much for your help. Any other ideas??

Offline

#157 2005-02-12 02:36:36

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

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

<strike>Did you turn on Clean URLs in admin > prefs?</strike>

Yeah, you said you did that.

Last edited by zem (2005-02-12 02:38:50)


Alex

Offline

#158 2005-02-12 15:34:19

bpk
New Member
Registered: 2005-01-27
Posts: 5

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

Thanks Zem. It is a mystery to me too. I am on a subdomain, so I’m wondering if that may be the problem??

http://mytestsite.com.primarydomain.com/?s=news

Looks like a great plugin… I’ll keep trying.

Offline

#159 2005-02-17 15:26:50

aesop1
Archived Plugin Author
Registered: 2004-09-19
Posts: 142

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

Any documented case of getting zem_rewrite (or some other clean URL method) to work with IIS?

Offline

#160 2005-02-28 21:53:34

rob_roy
Archived Plugin Author
Registered: 2005-02-28
Posts: 18

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

So far, so good. I’ve managed to get the following to all work (with RC3, by the way):

$uri_scheme[‘article’] = ‘{section}/{category}/{url_title}’;
These are my actual permanent links.

$uri_scheme[‘article_alt’] = ‘{section}/{article}/{url_title}’;
I’ve left this in so that txp generated links will work, until I find some way of ridding the system of them.

$uri_scheme[‘category’] = ‘{section}/{category}’;
All well and good here. I’ve changed a few things to generate /default/{category} whenever I need a list of ALL posts in a category, regardless of section. It’s not super pretty, but it’s not super ugly either.

$uri_scheme[‘section’] = ‘{section}’;
Obvious.

$uri_scheme[‘rss’] = ‘rss’;
This, shockingly enough, works. /rss returns the default rss feed.

$uri_scheme[‘atom’] = ‘atom’;
Ditto here.

Now my problem is with passing arguments on to the RSS and atom feeds if I want something other than the defaults, like a feed for a particular category, section or more than 5 articles. I’m not sure I’ve successfully wrapped my mind around things, however. What seems like it might work (I’m afraid I don’t know enough to know what SHOULD work) doesn’t.

I’ve added regexps ‘sec’ => ‘(?P<section>[\w\-%\+]+)’, ‘cat’ => ‘(?P<category>[a-zA-Z][\w\-_%\+]*)’, and ‘limit’ => ‘(?P<limit>\d+)’, since those are, I think, the arguments rss() and atom() are looking for. Then I’ve added schemes

$uri_scheme[‘atom’] = ‘atom/{cat}/{sec}/{limit}’;
$uri_scheme[‘rss’] = ‘rss/{cat}/{sec}/{limit}’;
(these are both rather specific, so I have them at the top of my schemes)

This doesn’t work, however, as a URL of my.site.com/atom/music/articles/15 returns an error of “The page you requested, atom/music/articles/15, was not found.” Occasionally, even though I can’t seem to reproduce it at the moment, I’ll even get “Unknown section atom”

Thanks for any help you guys can render.

Offline

#161 2005-02-28 23:02:50

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

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

> I’ve managed to get the following to all work (with RC3

Well that’s a surprise. Did you have to make any code changes, other than the URL schemes?


Alex

Offline

#162 2005-03-01 02:27:37

bpk
New Member
Registered: 2005-01-27
Posts: 5

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

Hello Everyone — I’m back with some more evidence in hopes that someone may have an idea why I can’t get this to work. I’m working under the conditions detailed in my previous post (echoed below as well).

- I upgraded to PHP 4.3.1 to see if that would help, but no luck.
- I’m now on a regular domain, no more subdomain.

Some different URL scenarios to consider…

1) http://www.mydomain.com/news

This shows the news section. Great!

2) http://www.mydomain.com/news/ (note the trailing slash)

This shows the content from the news section, but my style sheet doesn’t load. (Almost like this page is being server from a real directory called news and thus the relative path to the style sheet is wrong)

3) http://www.mydomain.com/not_a_section

“no page template specified for section not_a_section” (This is a section that doesn’t exist.)

4) http://www.mydomain.com/not_a_section/ (note the trailing slash)

“no page template specified for section not_a_section” (same as previous example)

5) http://www.mydomain.com/news/52/news-item-aaa

This shows the content from the news section, but my style sheet doesn’t load.

6) http://www.mydomain.com/news/52/news-item-aaa/

This shows the content from the news section, but my style sheet doesn’t load. (Same as above, this time including the trailing slash)

7) http://www.mydomain.com/index.php

“The page you requested, index.php, was not found.”

8) http://www.mydomain.com/index.php/

Loads the default (home) page WITHOUT stylesheet

9) http://www.mydomain.com/?s=news

This shows the news section with stylesheet.

Any ideas????? Thanks!!!!!

=================================

> bpk wrote:

> For some reason I cannot get this to work. Maybe I’m missing something here.

I’m using textpattern to manage a mostly static website: 7 simple pages or so. I have 7 defined sections and 7 articles, one for each section. Right now, calls to sections show the given pages of static content…

http://mydomain.com/?s=news

or

http://mydomain.com/?s=contact

where news and contact are the sections of the site.

I wanted to use zem_wewrite to clean the urls up a bit. The above would become…

http://mydomain.com/news/

and

http://mydomain.com/contact/

Here what I did…

(Background: I’m running apache on linux, textpattern 1.0rc1, and zem_rewrite-0.6, no other plugins installed)

1. installed the plug in first by file upload (and then by cut and paste—b/c I couldn’t get it to work)

2. Activated the plugin

3. Did NOT edit the default schemes in the plugin

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

4. Relaced original .htaccess with

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

(I tested re-write using the test providem by zem earlier in this post and the rewrite worked)

5. Deleted all placeholder files

6. Turned on /clean/ url admin, preferences

The result… It is similar to what jjeff spoke of. All urls just display the default home page (index.php).

http://mydomain.com/news/

displays the same as

http://mydomain.com/

Am I missing something? I tried the other test provided by zem to dump the variables

var_dump(serverSet(‘REQUEST_URI’), serverSet(‘PATH_INFO’));

and it successfully dumps ‘news’.

Any thoughts?? Thanks!

Last edited by bpk (2005-03-01 02:28:04)

Offline

#163 2005-03-01 14:21:51

rob_roy
Archived Plugin Author
Registered: 2005-02-28
Posts: 18

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

> zem wrote:

> > I’ve managed to get the following to all work (with RC3

Well that’s a surprise. Did you have to make any code changes, other than the URL schemes?

Nope, I’ve not made any changes to TXP or the plugin, other than what I mentioned above (trying to make new regexps and so on). Actually, I have added blocks that check the permlink_mode to a couple of functions in taghandlers.php, now that I think about it. Feed_link and Category_List. I still need to do feed_link_link, or whatever it’s called. Those are just changes to make things work better, however. It worked out of the box.

Offline

#164 2005-04-20 05:04:03

blumie607
Member
Registered: 2004-03-08
Posts: 175
Website

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

This is a great plugin. For some reason though, TXP (and zem_rewrite) are not accepting all my possibilities that I created in the plugin edit page. It only parses the first one, even if it doesn’t match.

Example:
mysite.com/section/id/article-title (is the first thing listed with [article]) and it works
mysite.com/section/id/ (is the second thing listed with [article_alt]) and it doesnt work

Thanks


bludrop studios .::. Creative Expression

Offline

#165 2006-02-24 13:23:09

papalozarou
Member
Registered: 2004-07-05
Posts: 45

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

Is this supposed to work with v4.0.x?

The problem I was hoping to solve was my feed urls (/section/title) being different to my actual url scheme (which is /year/month/day/title).

It works up to a point in that now, rather than getting an error upon clicking a url from my feed, it goes to the homepage every time. The only two lines I changed were the article and article alt bits. Is there something else i need to do?

Offline

Board footer

Powered by FluxBB