wordpress - How to redirect to sitemap.php from htaccess -


i using htaccess coppied wordpress.

rewritecond %{request_filename} !-f
rewritecond %{request_filename} !-d
rewriterule . index.php [l]

it works fine.

i add script redirect sitemap.php file if user requests sitemap.xml.

i tried adding rewritecond %{request_filename} !-^sitemap.xml$ didn't work.

put rule before set of rules:

rewriterule sitemap\.xml sitemap.php [l]  rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule . index.php [l] 

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

java - where to store the user credentials in an enterprise application(EAI)? -

openxml - Programmatically format a date in an excel sheet using Office Open Xml SDK -