Re: mod_rewrite problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Israel Brewster wrote:
> On Mar 8, 2007, at 8:33 AM, matt farey wrote:
>
>> yeah, if you compare the number and type of rewrites for this package
>> with the way that wordpress used to operate, there is a lot of
>> correlation, instead now wordpress uses a much simpler form of rewrite
>> which directs the REQUEST_URI to the application for subsequent
>> alteration, as is the case with your serendipity app. My idea would be
>> to handle all the serendipity rules with the app, leaving a much smaller
>> set of rules which would happily coexist and be easy to modify. I know
>> you say you aren't a php developer, but it wouldn't be that hard to
>> locate and alter the script, perhaps though it would be difficult to
>> subsequently update Serendipity and you would feel this would be a step
>> too far. my $0.02 - when wordpress changed their rewrite rules from 2k
>> down to  4 lines it was great!
>
> Actually, after the behavior I've been seeing while trying to work out
> this issue, I think the serendipity application may already work this
> way, in spite of the fact that it writes out that long list of rules.
> If I am understanding what is going on properly, then as long as the
> REQUEST_URI typed into the address bar is one that serendipity
> understands (i.e. /categories/8-Nagios) then it doesn't really matter
> what it is rewritten to, as long as the rewrite calls index.php? So,
> in theory at least, I should be able to replace all those rewrites
> with a blanket rewrite whatever to index.php?url=, and it should still
> work.  Of course, I would need to have exceptions for the things I
> DON'T want handled my the serendipity php script, but that shouldn't
> be too difficult. I'll have to experiment with that some.
>
>
I am sure you are right, it's why I mentioned it really, here's the rule
that I swear by - not that I swear really!
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L,NS]

obviously placed in some directory statement in the main
httpd-rewrites.conf file.
Using a couple of extra conditions might be all you need to prevent S
from stealing focus as it were, and will lead yuo on to a nice relaxing
weekend.
ciao, m




-- 
Matthew Farey9



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux