Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Ace_News questions

(Page 2 of 2)
> >
Quote Reply
Re: [Chas-a] Ace_News questions In reply to
In Reply To:

RewriteEngine on
Options All
RewriteBase /
RewriteRule ^some-folder-name/([0-9]+)/?$ cgi-bin/news.cgi?a=article&ID=$1

Let me know if you have any other questions.

Hey chas or Andy,
Is it possible to create a rewrite similar to this for the categories. I'd like to be able to enter a url like mywebsite.com/news/computing/ and have it list all the articles in computing. Would something like this work?

RewriteRule ^some-folder-name/(.*)/([0-9]+)/?$ cgi-bin/news.cgi?a=article&ID=$1 or

RewriteRule ^some-folder-name/(.*)/([0-9]+)/?$ cgi-bin/news.cgi?a=category

thanks in advance.

ccunet
my Christian web
Quote Reply
Re: [ccunet] Ace_News questions In reply to
Did some experimenting and this seems to work.

RewriteRule ^some folder/(.*)/?$ cgi-bin/guide/news.cgi?a=category&cat=$1

so www.mysite.com/somefolder/somecategory/ will get the category page with all the articles for that category.

ccunet
my Christian web

Last edited by:

ccunet: Apr 20, 2004, 7:42 PM
Quote Reply
Re: [ccunet] Ace_News questions In reply to
OK I've run into somesnags.

first my news.cgi seems to be still generating a times stamp ID for the news items

ex. http://www.mychristianweb.com/...le&ID=1082516680

this actually isn't stored in teh db since clicking on it gets a no srticle error. However
http://www.mysite.com/...i?a=article&ID=2 works.


second the rewrite sets the article link to the rewrite directory

ex. http://www.mychristianweb.com/test/shopping

any thoughts

ccunet
my Christian web
Quote Reply
Re: [ccunet] Ace_News questions In reply to
  
It looks like its all working aside from the news_link.html and news_tag_link.html Templates haven't been updated to reflect the changes:


<p><a href="<%build_root_url%>/test/shopping/<%NewsID%>/"><%Title%></a><br /><%Short%></p>




Comedy Quotes - Glinks 3.3.0, PageBuilder, StaticURLtr, CAPTCHA, User_Edit_Profile

Quote Reply
Re: [Chas-a] Ace_News questions In reply to
In Reply To:

It looks like its all working aside from the news_link.html and news_tag_link.html Templates haven't been updated to reflect the changes:


<p><a href="<%build_root_url%>/test/shopping/<%NewsID%>/"><%Title%></a><br /><%Short%></p>

Chas,
This is what I changed the template is to

<a href="<%db_cgi_url%>/news.cgi?a=article&ID=<%NewsID%>"><%body_font%><%Title%></font></a>
now all the links work.
But I'm still dealing withthe dreaded trailing slash rewrite problem.
So www.mysite.com/test/category works but
www.mysite.com/test/category/ doesn't.
I'm going to have to laern how to overcome that because it comes up with several of my rewrite rules.

ccunet
my Christian web
Quote Reply
Re: [ccunet] Ace_News questions In reply to
 
There's a couple of articles here that may be able to help you with that:

sitepoint.com/article/guide-url-rewriting

sitepoint.com/article/mod_rewrite-no-endless-loops



Comedy Quotes - Glinks 3.3.0, PageBuilder, StaticURLtr, CAPTCHA, User_Edit_Profile

> >