Re: Simpler urls
- From: Jerry Stuckle <jstucklex@xxxxxxxxxxxxx>
- Date: Mon, 16 Jul 2007 20:43:17 -0400
Paul Furman wrote:
NC wrote:On Jul 10, 5:14 pm, Paul Furman <pa...@xxxxxxxxxxxxx> wrote:
OK so no considerations for my php coding?
Right now I've got urls & code like this:
But I'd prefer:
I'd like to see at most:
If your hosting company allows .htaccess files, add these lines to
your .htaccess file in the site's root directory:
RewriteRule ^California(.*)$ /1/?SC=go.php&DIR=California$1 [NC,L]
This should do the trick.
Looks cool, from what I can tell, the only thing to learn is the
syntax & rule evaluating order.
Hence, the links:
Ack... regular expressions!!!!!!!!!
Anyone interested in a little consulting to get me up to speed on a basic framework for this system, please email. I've got a couple web sites that could use this upgrade but it's beyond me for now to even get a basic effect to take hold with .htaccess on the first one I tried.
Sounds like I could set up however big an htaccess file to
identify my simplified structure but maybe at some point
it would take a hit on performance... or not if I figure
out how to tell it to stop searching the rule list.
That's actually easy; you put [L] (meaning, "last") after the rule.
If Apache executes a rule with [L] after it, it stops looking for
other rules to execute.
I'd suggest you try asking in alt.apache.configuration. That's where those gurus hang out.
There are a few here with knowledge about how to do it, but many more over there.
Remove the "x" from my email address
JDS Computer Training Corp.
- Prev by Date: problem with session in IE
- Next by Date: Re: problem with session in IE
- Previous by thread: Re: Simpler urls
- Next by thread: Re: Simpler urls