Error in Sitemap.xml
« on: August 06, 2008, 02:02:34 PM »
Hi ,

i have this line in my .htaccess file which i need it for generate the rss.xml file :
AddType application/x-httpd-php .php .xml

when i have this line then sitemap.xml doesnt shows up and i get this error :
Parse error: syntax error, unexpected T_STRING in /home/user/public_html/sitemap.xml on line 1

I need both , how can i have them working together ??

Any help would be Great .

Thanks
Re: Error in Sitemap.xml
« Reply #1 on: August 06, 2008, 05:46:36 PM »
Hello,

try to change it to:
Code: [Select]
AddType application/x-httpd-php .php
<Files ror.xml>
AddType application/x-httpd-php .xml
</Files>
Re: Error in Sitemap.xml
« Reply #2 on: August 06, 2008, 05:52:54 PM »
when i changed it to
Code: [Select]
AddType application/x-httpd-php .php
<Files ror.xml>
AddType application/x-httpd-php .xml
</Files>
then Sitemap.xml  loading and rss.xml NOT .

I changed to this :
Code: [Select]
AddType application/x-httpd-php .php
<Files rss.xml>
AddType application/x-httpd-php .xml
</Files>

and now both are working !! am i did wrong or it is another way ?!!!
Re: Error in Sitemap.xml
« Reply #4 on: August 07, 2008, 05:07:06 PM »
ok Awesome . works very well ..

u are Great Oleg . today in last 10 min u resolved my 2 big problems (vbseo "mecho is my username" and here)

Appreciate it .
Re: Error in Sitemap.xml
« Reply #5 on: August 19, 2008, 11:13:21 PM »
would u please tell me how can i have 2 files in this part of code :

Quote
AddType application/x-httpd-php .php
<Files rss.xml>
AddType application/x-httpd-php .xml
</Files>

currently just rss.xml is in the code and now i need to add another xml file too .

thanks in advance .
Re: Error in Sitemap.xml
« Reply #6 on: August 22, 2008, 01:42:08 AM »
You can add other filenames like:

Code: [Select]
<FilesMatch "(rss|name2|anothername)\.xml$">
AddType application/x-httpd-php .xml
</FilesMatch>
Re: Error in Sitemap.xml
« Reply #7 on: August 22, 2008, 11:57:15 AM »
Appreciate it .

works well.
Re: Error in Sitemap.xml
« Reply #8 on: January 25, 2009, 10:50:23 AM »
hmm this is really wierd !

it suddenly stopped showing my rss.xml file and same error that i had before :

Quote
XML Parsing Error: not well-formed
Location: [ External links are visible to forum administrators only ]
Line Number 28, Column 3:<? header('Content-type: text/xml'); ?>
--^


Any idea ???
Re: Error in Sitemap.xml
« Reply #9 on: January 25, 2009, 04:44:13 PM »
Hello,

did you change your .htaccess file? Please check if it works with .htaccess temporarily removed.
Re: Error in Sitemap.xml
« Reply #10 on: February 07, 2009, 07:16:08 AM »
No i have change nothing .

the only change was in our server , using LiteSpeed instead of Apache .

and still have these lines in .htaccess file :
Quote
AddType application/x-httpd-php .php
<Files rss.xml>
AddType application/x-httpd-php .xml
</Files>
Re: Error in Sitemap.xml
« Reply #11 on: February 08, 2009, 02:00:15 AM »
Hello,

litespeed doesn't support .htaccess files I think, you should add thos echanges in litespeed config file instead.
Re: Error in Sitemap.xml
« Reply #12 on: February 11, 2009, 08:13:58 AM »
i have added all rewrite rules include those lines to httpd.cnfg (like vbseo) . but still i have errors in my rss.xml file !!

([ External links are visible to forum administrators only ])
Re: Error in Sitemap.xml
« Reply #13 on: February 11, 2009, 11:06:20 PM »
Hello,

litespeed has a different config and you should use some different options for your RSS feed perhaps. (that doesn't affect your sitemap though)