Jump to content


This topic is now archived and is closed to further replies.


htaccess mysql problem...

Recommended Posts

I'm trying my hand at modrewrite but have run into an issue. Here's what I have in my htaccess-
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*)/real-estate/(.*)/(.*)/ details.php?data=$3&MLS=$2&mun=$1
RewriteRule (.*)/real-estate/(.*)/(.*) details.php?data=$3&MLS=$2&mun=$1

When I type in a url like below-

[a href=\"http://www.foo.com/botetourt/real-estate/345123/1/\" target=\"_blank\"]http://www.foo.com/botetourt/real-estate/345123/1/[/a]

which translates to-

[a href=\"http://www.foo.com/details.php?data=1&MLS=345123&mun=botetourt\" target=\"_blank\"]http://www.foo.com/details.php?data=1&MLS=...3&mun=botetourt[/a]

What's happening though is I get a SQL error because it's passing the value of $MLS as '345123/1' instead of '345123' and separating the '1' as the value of $data. What am I doing wrong here?


Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.