MobileHacks
New Member
This mod generates a Google's sitemap XML with the URL rewrites of TFSEO.
READ CAREFULLY:
ONLY WORKS WITH METHOD 2 OF TFSEO (MEDIUM), with URL STRUCTURE SET TO DIRECTORY (THE FIRST ONE)
1. Add this line to your htaccess rules:
RewriteRule (.*)\.xml(.*) $1.php$2 [nocase]
2. Open sitemap.php and fill the required data.
3. Upload sitemap.php to the root of your forum.
4. Write in browser
to generate the xml google sitemap.
About the rewrite rule:
What this does is it turns on the rewrite rule (allowing you to modify how URLs are handled, essentially) and adds the logic that allows a file.php to be intepreted as file.xml.
This now means that if you put sitemap.xml into your browser you'll be viewing the output from sitemap.php and that's crucial because now when Google looks for sitemap.xml it's viewing live data from your PHP script. This means that your sitemap.xml file will never be inaccurate.
So now you only must go to
http://www.google.com/webmasters/too...um/sitemap.xml
each you time you want to tell google to index the changes of your sitemap. The xml is generated by the php code on the fly so is always correct
limitations: Writes only forum and threads urls (i think is enough for most uses).
READ CAREFULLY:
ONLY WORKS WITH METHOD 2 OF TFSEO (MEDIUM), with URL STRUCTURE SET TO DIRECTORY (THE FIRST ONE)
1. Add this line to your htaccess rules:
RewriteRule (.*)\.xml(.*) $1.php$2 [nocase]
2. Open sitemap.php and fill the required data.
3. Upload sitemap.php to the root of your forum.
4. Write in browser
Code:
http://www.yourfoum.com/sitemap.php
About the rewrite rule:
What this does is it turns on the rewrite rule (allowing you to modify how URLs are handled, essentially) and adds the logic that allows a file.php to be intepreted as file.xml.
This now means that if you put sitemap.xml into your browser you'll be viewing the output from sitemap.php and that's crucial because now when Google looks for sitemap.xml it's viewing live data from your PHP script. This means that your sitemap.xml file will never be inaccurate.
So now you only must go to
http://www.google.com/webmasters/too...um/sitemap.xml
each you time you want to tell google to index the changes of your sitemap. The xml is generated by the php code on the fly so is always correct
limitations: Writes only forum and threads urls (i think is enough for most uses).