Forum Moderators: phranque
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*)/(.*)/(.*)/?$ $1.php?id=$2&id2=$3
but it doesn't work. It's particularly weird because when I repalce "/" with "_", it works fine, which makes me think something is broken.
Anyone?
Storm
site.com/display/2/3/
It came up with what I had for:
site.com/display.php?id=2&id2=3
I put some echo's in my display.php to display what the ID's were equal to and it worked?...
In your orignial post you put:
[zxc.com...]
Did you mean display? or display.php?
Yes, that's exactly what I'm trying to achieve.
In your orignial post you put:
[zxc.com...]
<Did you mean display? or display.php?
I meant display.php
After this post and hundreds of acticles I have seen, I'm almost sure that mod rewrite with slash is just turned off in my case (if it's possible - I don't know Apache servers at all)... it is probable because it's my father's server, maintained by a hired worker. I already sent him an email but it turned out that he had gone on his vacation. Is there some way to get a report on mod rewrite, all configuration and etc? Perhaps, then I could find the source of this problem.
Thanks
I don't want my point to get lost there in my dig at Gates & Co., but what I mean is that Apache is simple, and it's bugs tend to be simple... As long as the load is good.
Your code looks fine, even though smatts' tweaks should make it faster. In addition, since he was kind enough to test it for you on his server and it worked, this is obviously a problem specific to your server.
This sounds like a bad or corrupted copy of either mod_rewrite or the regular-expressions library in the OS (which is used by mod_rewrite). You'll need to wait for your admin, or hire someone else locally to look into reinstalling those components.
It's also possible you've got a very old or 'strange' regular-expressions library in the OS. I suppose you could try escaping the slashes in the patterns, but this should absolutely not be necessary on any modern Apache load with a modern regex library -- e.g. ^quux\/foo\/bar\.php$
Jim
Storm