Gossamer Forum
Home : General : Internet Technologies :

mod_rewrite - :/

Quote Reply
mod_rewrite - :/
Hi,

I've got the following mod_rewrite code;

Code:
RewriteEngine On
RewriteRule ^index.html index.php [L]
RewriteRule ^article(\d+).html$ modules.php?name=News&file=article&sid=$1 [L]
RewriteRule ^(.*).mod$ modules.php?name=$1 [L]

The first and last one's work fine, but the second one just doesn't seem to be making a match.

Example call: article1.html , which *should* convert to modules.php?name=News&file=article&sid=1

Any ideas?

TIA

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] mod_rewrite - :/ In reply to
Doh... just had a stupid 10 mins <G>

It should have been;

RewriteRule ^article([0-9]+).html$ modules.php?name=News&file=article&sid=$1 [L]

..and not;

RewriteRule ^article(\d+).html$ modules.php?name=News&file=article&sid=$1 [L]

..which is the Perl regex version <G>

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates