Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Dynamic detailed with mod_rewrite and static cats.. a better way?

Quote Reply
Dynamic detailed with mod_rewrite and static cats.. a better way?
Hi, I have managed to get dynamic detailed pages using mod_rewrite and static category pages. just wondering if there is a better way?

So far I have in my .htaccess obviously changing listings to whatever you have set as your Detailed path

Code:

Options +FollowSymLinks
RewriteEngine On
RewriteRule ^([a-zA-Z0-9]*).html$ /cgi-bin/dir/page.cgi?g=listings\%2F$1.html;d=1 [L,NC]
and to get around actually building the pages I have done what Robert suggested @ http://www.gossamer-threads.com/...orum.cgi?post=183030 .. that is I added $cond->add ('isValidated', '=', 'No'); in nph-build.cgi below $cond->add(VIEWABLE); . It works fine but wondering if anyone has a better way of doing it?
Quote Reply
Re: [garrynz] Dynamic detailed with mod_rewrite and static cats.. a better way? In reply to
Hi,

Are you using yogi's global? He wrote a VERY nice bit of rewrite code, which search engines seem to love (especially Google Smile).

I'll dig it up if you want (this it might even be linked on sqlwidgets.com).

Hope that helps

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Dynamic detailed with mod_rewrite and static cats.. a better way? In reply to
Hi, no I am not. I will have a look at it though. I should of also added if someone wants to do it my way you need to have build detailed on and build dynamic off. So that when they click on the link to view detailed page it takes them to the dynamic pages but all the links in the breadcrumb etc point to the static pages. Stop you getting duplicate pages in the search engines....
Quote Reply
Re: [garrynz] Dynamic detailed with mod_rewrite and static cats.. a better way? In reply to
Hi,

This is actually the exact situation detail_page.cgi was designed to overcome.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Dynamic detailed with mod_rewrite and static cats.. a better way? In reply to
In Reply To:
Hi,

This is actually the exact situation detail_page.cgi was designed to overcome.


Hi pugdog, can you please throw some more light on this. I would really love to know how to set a directory up, where all the category pages are build static, while detailed pages are done dynamically. As this can be big time resource saver.

Thanks for the help again.

Vishal

Vishal
-------------------------------------------------------
Quote Reply
Re: [SWDevil.Com] Dynamic detailed with mod_rewrite and static cats.. a better way? In reply to
It might have to be tweaked for GL3, as I haven't updated those sites, but I wrote the detail_page.cgi to allow dynamic detail pages from a staticly build site. I had some larger sites, and wanted more interaction on the detail pages, while saving some overhead on the category pages.

You just don't pass in d=1, and the links will link back to the static category pages.

Search the forums here for the updated version.

I thought I released a new version a few months back, that fixed some stats problems.

While you can do that with page.cgi, at least in Links 2.x the detail_page.cgi also fixed up some missing variables.

You link to the detail page with <%db_cgi_url%>/detail_page.cgi?ID=<%ID%>

No rewrite rules are required.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Dynamic detailed with mod_rewrite and static cats.. a better way? In reply to
Quote:
You link to the detail page with <%db_cgi_url%>/detail_page.cgi?ID=<%ID%>


I have not installed it yet, so am asking this without testing, please do pardon my ignorance.

Suppose if I use above code for linking detailed page, and then when user click on "home" or other link within the website, will it go to dynamic side of the website or static?

Vishal

Vishal
-------------------------------------------------------
Quote Reply
Re: [SWDevil.Com] Dynamic detailed with mod_rewrite and static cats.. a better way? In reply to
Using the above code, the page will be written out as "static" as if a build had written the page to the detailed directory. It will staticly link to the other pages.

You can try it, and see if it does what you want. I'm really not sure what the current version number is, or where it is ... I've lost track. But the most recent revision is probably less than 6 months old.

I had a newer one, but it was giving me grief, so I shelved it for awhile. Could not figure out why hit counts were incrementing by 2. There was only a single call, so it had to be inside MySQL, but it was driving me crazy. If I can find the time, I will try to dig it up and test it again. There are a whole host of revisions for programs on the way, time is the killer.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Dynamic detailed with mod_rewrite and static cats.. a better way? In reply to
Later on I am going to search for the plugin on the board and see if I can find it, and if I do, then I will also post it here for others to read :)

Vishal

Vishal
-------------------------------------------------------
Quote Reply
Re: [SWDevil.Com] Dynamic detailed with mod_rewrite and static cats.. a better way? In reply to
I'm trying to get them all in one place, but life has been a wreck for awhile, and this weekend I almost lost my wife and kids in an accident when the brakes failed when the power steering pump died, and the car almost went over an embankment into a propane tank. I can't figure out why two main systems are connected so a single failure takes out your steering *and* brakes. You can't control the car, OR stop.

It stopped right on the edge, just like in a movie, where you worry one wrong move and it will finish sliding over the edge.

Sometimes I feel like one of the guys on Hee Haw in the "If it weren't for bad luck, I'd have no luck at all..." skits.

Getting organized has simply taken a back seat to just getting things done.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Dynamic detailed with mod_rewrite and static cats.. a better way? In reply to
Well my friend, working right now should be the least of your worries. Also congrats on not dying or loosing your family. But think about it, you and your family are very lucky - cuz bad things happens to may people, while you survived :)

Vishal
-------------------------------------------------------
Quote Reply
Re: [pugdog] Dynamic detailed with mod_rewrite and static cats.. a better way? In reply to
In Reply To:
I'm trying to get them all in one place, but life has been a wreck for awhile, and this weekend I almost lost my wife and kids in an accident when the brakes failed when the power steering pump died, and the car almost went over an embankment into a propane tank. I can't figure out why two main systems are connected so a single failure takes out your steering *and* brakes. You can't control the car, OR stop.

It stopped right on the edge, just like in a movie, where you worry one wrong move and it will finish sliding over the edge.

Sometimes I feel like one of the guys on Hee Haw in the "If it weren't for bad luck, I'd have no luck at all..." skits.

Getting organized has simply taken a back seat to just getting things done.


I am glad to see you here (again)
Wink
Quote Reply
Re: [pugdog] Dynamic detailed with mod_rewrite and static cats.. a better way? In reply to
Hi Pugdog,

Glad you're here to tell us about it and that your family is safe and sound. It seems you ultranerd guys are having bad experiences this year with cars !

Take care,

John
Significant Media