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 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -