- Impact
- 38
This is what I have so far:
I need this to happen:
listings/sandiego/Vendor-Name/ -> listing.php
listings/sandiego/Vendor-Name -> listing.php
listings/sandiego/Vendor-Name/add-review.html -> listing_add_review.php
listings/sandiego/Vendor-Name/send-message-friend.html -> listing_email_friend.php
listings/sandiego/Vendor-Name/send-message.html -> listing_email.php
Also it would be nice for the first link to work with or without the trailing slash:
listings/sandiego/Vendor-Name/
listings/sandiego/Vendor-Name
The problem right now is if I go to
listings/sandiego/Vendor-Name/add-review.html
It sends me to the homepage (It is looking for the wrong ID). Help appreciated thanks guys!
Code:
RewriteRule ^listings\/(.+)/(.+)$ listing.php?id=$2&loc=$1&type=detail [L]
RewriteRule ^listings\/(.+)/(.+)/add-review\.html$ listing_add_review.php?id=$2&loc=$1&type=review [L]
listings/sandiego/Vendor-Name/ -> listing.php
listings/sandiego/Vendor-Name -> listing.php
listings/sandiego/Vendor-Name/add-review.html -> listing_add_review.php
listings/sandiego/Vendor-Name/send-message-friend.html -> listing_email_friend.php
listings/sandiego/Vendor-Name/send-message.html -> listing_email.php
Also it would be nice for the first link to work with or without the trailing slash:
listings/sandiego/Vendor-Name/
listings/sandiego/Vendor-Name
The problem right now is if I go to
listings/sandiego/Vendor-Name/add-review.html
It sends me to the homepage (It is looking for the wrong ID). Help appreciated thanks guys!













