htaccess code

Change sitemap.txt to sitemap.php if url http://domain.com/sitemap.txt

# http://domain.com/sitemap.txt open sitemap.php
# in sitemap.php is function what return list of address
RewriteRule ^sitemap\.txt$ sitemap.php [L]
RewriteRule ^sitemap$ sitemap.php [L]

Remove www before subdomain name
www.www.subdomain.example.com
to
subdomain.example.com

RewriteCond %{HTTP_HOST} (^|\.)(www\.)([^\.]*)\.example\.com$ [NC]
RewriteRule (.*) http://%3.example.com/$1  [R=301,QSA,L]
This entry was posted in Uncategorized and tagged . Bookmark the permalink.


Comments are closed.

3,060 views