Mod Rewrite 2 Part Question

后端 未结 3 594
無奈伤痛
無奈伤痛 2021-01-27 12:09

I was wondering how can I rewrite the following URL below using mod_rewrite? And is there a online tutorial that explains mod_rewrite for dummies?

How can I rewrite this

3条回答
  •  [愿得一人]
    2021-01-27 12:38

    I suggest:

    RewriteRule ^/sitemap.php$ /sitemap.xml
    

    As for a tutorial, have you tried the official Apache mod_rewrite Introduction? Following that, there are lots of useful examples in the URL Rewriting Guide and Advanced URL Rewriting Guide... they might be complex but it does have examples of many common rewrite tasks.

提交回复
热议问题