Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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: 43

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

#166 2006-02-24 16:49:14

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

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

> “Is this supposed to work with v4.0.x?”
No.

Offline

#167 2006-03-23 16:05:26

teamtom
New Member
From: Budapest, Hungary, Europe
Registered: 2005-08-15
Posts: 9
Website

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

Hi zem,
i try to use zem_rewrite0.6 with txp4.0.3 with this scheme:
$uri_scheme[‘article_urltitle’] = ‘txp/{section}/{category}/{url_title}’;

a note: i inserted “txp/” at the beginning because in my test environment (my site is located at localhost/txp) the the plugin made wrong links like: localhost/sectionname/… instead of localhost/txp/sectionname/…

the problem:
i would like to use permlinks with scheme mentioned above
they looks like the scheme, but do not work: every click on these permlinks gives a 404

i use hard-coded messy links for these links:
localhost/txp/sectionname/index.php?c=categoryname&id=articleid
they work fine, but they are ugly :(

can you help me? what did i wrong? thx in advance!

PS: i tried $uri_scheme[‘article_test’] = ‘txp/{section}/{article}/{category}’;
to make the scheme unambiguous, but did not work either

Last edited by teamtom (2006-03-23 16:23:57)

Offline

#168 2006-08-18 14:03:53

xjosie729
Member
From: Framingham, MA
Registered: 2006-07-22
Posts: 39
Website

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

A couple problems:

When I go to the article permlink page, there’s a line at the bottom which says /news/test/welcome/#cpreview" id="txpCommentInputForm">.

Also, the comments does not work with this plugin.


Josie

Offline

Board footer

Powered by FluxBB