I am going in circle on this.
RewriteRule ^Homes-by-price Real-Estate-Listings.php?minPrice=0&maxPrice=999999999 [NC,L]
RewriteRule ^Homes-by-price/([0-9]+) Real-Estate-Listings.php?minPrice=0&maxPrice=$1 [NC,L]
The first line works. When I enter /Homes-by-price and get the page showing
Real-Estate-Listings.php?minPrice=0&maxPrice=999999999
But when I type in
/Homes-by-price/100000
I should get
Real-Estate-Listings.php?minPrice=0&maxPrice=100000
Instead I get a blank web page and the debug console showing me the HTML script for the page.
If I type in
/Real-Estate-Listings.php?minPrice=0&maxPrice=100000
everything displays correctly.
Complete htaccess (The commented out portions where removed for trouble shooting this issue.)
DirectoryIndex default.html
#Block listing of folder contents
IndexIgnore *
RewriteEngine on
#Rewrite rule for force https and www
# located in 000-default.conf
#rewrite rules single listing page (real-estate-listing.php)
#RewriteRule ^home-for-sale/mls/([0-9]+) real-estate-listing.php?mls=$1 [NC,L]
#RewriteRule ^home-for-sale/([A-Za-z0-9\-]+)/([A-Za-z0-9\-]+) real-estate-listing.php?city=$1&address=$2 [NC,L]
#RewriteRule ^commercial-property-for-sale/([A-Za-z0-9\-]+)/([A-Za-z0-9\-]+) real-estate-listing.php?city=$1&address=$2 [NC,L]
#RewriteRule ^land-for-sale/([A-Za-z0-9\-]+)/([A-Za-z0-9\-]+) real-estate-listing.php?city=$1&address=$2 [NC,L]
#RewriteRule ^business-for-sale/([A-Za-z0-9\-]+)/([A-Za-z0-9\-]+) real-estate-listing.php?city=$1&address=$2 [NC,L]
#RewriteRule ^property-for-sale/([A-Za-z0-9\-]+)/([A-Za-z0-9\-]+) real-estate-listing.php?city=$1&address=$2 [NC,L]
#RewriteRule ^investment-property-for-sale/([A-Za-z0-9\-]+)/([A-Za-z0-9\-]+) real-estate-listing.php?city=$1&address=$2 [NC,L]
#rewrite rules for search page showing multiple listings (Real-Estate-Listings.php)
RewriteRule ^Homes-by-price/([0-9]+) Real-Estate-Listings.php?minPrice=0&maxPrice=$1 [NC,L]
RewriteRule ^Homes-by-price Real-Estate-Listings.php?maxPrice=999999999 [NC,L]
<IfModule mod_headers.c>
<FilesMatch ".(js|css|xml|gz|html|php|json)$">
Header append Vary: Accept-Encoding
</FilesMatch>
</IfModule>
Not sure if this is the best solution, but it did resolve the issue.
By use the full URL in the rewrite statement it now works. It now reads: