Jump to content

htaccess mysql problem...


croakingtoad

Recommended Posts

I'm trying my hand at modrewrite but have run into an issue. Here's what I have in my htaccess-
[code]
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
[/code]

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?

Thanks!
Link to comment
https://forums.phpfreaks.com/topic/10532-htaccess-mysql-problem/
Share on other sites

Archived

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

×
×
  • Create New...

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.