httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blomstrom <>
Subject RE: [users@httpd] Need a mod-rewrite rule for a website's home page
Date Thu, 27 Apr 2006 00:09:27 GMT
OK, I gave it another try, and it *seems* to be working. (I always qualify my statements, because
I get so confused between PHP, MySQL and mod-rewrites, I'm not always sure if things are actually
working or not.) But I can currently display rewritten dynamic links on both my home page
and home-page/About, while typing in incorrect URL's produces an error page. So it looks like
it's squared away. These are the rewrite rules I used:

RewriteRule ^About/([a-zA-Z0-9_/-]+)/?$ About/index.php?bout=$1 [L]
RewriteRule ^/?([-a-zA-Z0-9_/]+)/?$ /index.php?home=$1 [L]

Many thanks.

Boyle Owen <> wrote: > -----Original Message-----
> From: David Blomstrom [] 
> You mean literally reverse the order of the rewrite rules, like this?:
RewriteRule ^About/?(-[a-zA-Z0-9_/]+)/?$ About/index.php?bout=$1 [L]
RewriteRule ^/?([-a-zA-Z0-9_/]+)/?$ /index.php?home=$1 [L]

Yes.. Actually, are you sure the first rule works at all? I think you need "^/About..." (note
leading slash).

Then anything beginning with About should be rewritten and then the [L] causes a break.

> I tried that, but it doesn't seem to work.

Does it or doesn't it? (there is no "seem" :-) What does the log say? What happens when you
try test URLs (give examples of before and after)?

New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.
View raw message