Forum

Thread tagged as: Question

Rewrite rule for list and detail on master page

Hi,

I have a masterpage that has list and detail functionality which all works but I'm struggling to get the correct syntax for the clean URLs. The URLs currently look like these:

/developments/dynamic-page-name?s=plot-a
/developments/dynamic-page-name?s=plot-b
/developments/another-dynamic-page-name?s=plot-a

I have experimented with rewrite rules but this has me stumped!

Andy Knight

Andy Knight 1 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you using Runway?

No, just Perch

Drew McLellan

Drew McLellan 2638 points
Perch Support

I'll leave this here in case anyone has suggestions for you.

Simon Clay

Simon Clay 127 points

Hi Andy, I am not an htaccess expert by any stretch, but I feel that a rewrite rule in your case for your first url would be something like:

RewriteRule ^developments/([a-zA-Z0-9-/]+)/([a-zA-Z0-9-/]+)$ /developments/$1?s=$2 [L]

But perhaps you've tried that already?