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

Rewrite rule for cgi scripts

Quote Reply
Rewrite rule for cgi scripts
Hi,

As a complete novice with this I was wondering whether anyone could tell me if it is important to use this type of indicator at the end of a rewrite rule if redirecting to a script :

[L,T=application/x-httpd-cgi]

where I would for example have :

Code:
RewriteRule ^/reviews/.*L([0-9]+).*\html$ /perl/review.cgi?ID=$1 [L,T=application/x-httpd-cgi]

Obviously the output of the script will be html or xhtml but I was just wondering what importance the [L,T=application/x-httpd-cgi] code has ?

Thanks, John
Significant Media
Quote Reply
Re: [Jag] Rewrite rule for cgi scripts In reply to
You shouldn't need that :/

Normally, [L,R] or just [L] will work. You can change the status of the R with R:302 (or whatever status code). I have to admit, I've never used T=content-type, as it normally works fine without :) Not sure if there are any speed/SEO reasons for doing it, but personally I'd just leave it as [L] Smile

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] Rewrite rule for cgi scripts In reply to
Thanks for the info Andy.
You'll have far more experience than me on this one anyway and as you say I don't have any issues just using the [L] value but when reading up on rewrite rules I came across this content indicator several times when cgi scripts were used.

Anyway as you say it doesn't seem to affect it in any way but that's most probably because I followed your advice of moving to GT hosting and that everything's so fast I wouldn't see the difference Wink

Thanks, John
Significant Media