Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rewrite rule .htaccess for my sitemap.xml

I have a content management system plugin installed that provides a sitemap for Google under http://www.domain.com/index.php?eID=dd_googlesitemap how can I add a rewrite rule to my .htaccess that will make this sitemap available under http://www.domain.com/sitemap.xml instead?

like image 871
Dominik Avatar asked Nov 01 '25 07:11

Dominik


1 Answers

You can add this code to your htaccess file (which has to be in root folder)

RewriteEngine On
RewriteRule ^sitemap\.xml$ /index.php?eID=dd_googlesitemap [L]

Make sure mod_rewrite is enabled

like image 88
Justin Iurman Avatar answered Nov 04 '25 13:11

Justin Iurman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!