1

I have website with this output Link :

https://domain1.net/estates.php?estname=XXXX&location=YYYYY

I want change it to :

https://domain1.net/XXXXX/YYYYY

I try it with following rewrite rule :

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]*)/([^/]*)/?$ /estates.php?estname=$1&location=$2 [L]

or

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^-]*)/([^-]*)/?$ /estates.php?estname=$1&location=$2 [L]

but result not work fins , means when test it site design break down and pic and CSS element not loading .

  • By the sounds of it, your URL rewrite is "working" as intended (your first rule block looks OK) - the request IS being internally rewritten to /estates.php with the appropriate URL parameters? BUT your images and CSS are broken? This is commonly caused by (incorrectly) using relative URL paths to your static resources. SEE this other question (and my answer) that explains this: webmasters.stackexchange.com/questions/86450/… - does this answer your question? – MrWhite Apr 3 at 9:26