PDA

View Full Version : Google and Yahoo Sitemap Not working



Tariq hamed Ahmed
October 17, 2013, 08:11 PM
Hello,

I installed the plugin.
When I add this to my .htaccess:


#Google and Yahoo sitemap
RewriteRule ^([a-z_]*)?sitemap([0-9]*).xml$ plugins/sitemap/sitemap.php?search=google&number=$2&mod=$1 [QSA,L]
RewriteRule ^yahoo-sitemap.txt$ /plugins/sitemap/sitemap.php?search=yahoo [QSA,L]
RewriteRule ^urllist.txt$ /plugins/sitemap/sitemap.php?search=urllist [QSA,L]

I got this error on my website:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@MYDOMAIN.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

Can you please help to fix this issue?

Thank you,
Tariq

Viktor
October 18, 2013, 04:21 AM
Hello Tariq,

Would you please send me htaccess file. I need to check it. I think you added it in wrong place.

Tariq hamed Ahmed
October 18, 2013, 04:24 AM
Hello Viktor,

Thank you for this fast response.

Here is my htaccess file code:

# enable apache morRewrite module #
RewriteEngine on

RewriteBase /

# set files headers
<IfModule mod_headers.c>
<FilesMatch "\.(css|js|png|gif|jpg|jpeg|htc)$">
Header set Cache-Control "max-age=2678400, public, must-revalidate"
</FilesMatch>
</IfModule>

# deflate static content
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/x-component text/css application/x-javascript application/javascript
</IfModule>

# allow request methods
<Limit POST PUT DELETE GET OPTIONS HEAD>
Order deny,allow
Allow from All
</Limit>

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f

ErrorDocument 404 /404.html

# non last slash redirect
RewriteCond %{REQUEST_URI} !(\.php|\.html|\.xml|\.txt|[\/])$ [NC]
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1/ [NC,L,R=301]

# define system languages
#RewriteRule ^([a-zA-Z]{2})$ index.php?page=$1 [QSA,L]

# define paging
RewriteRule ^([^//]+)/?(.*)?/index([0-9]*).ht(m?ml?)$ index.php?page=$1&rlVareables=$2&pg=$3 [QSA,L]

# define listing
RewriteRule ^(([\w\-\_]+)?/)(.+)-l?([0-9]+).ht(m|ml)$ index.php?page=$2&rlVareables=$3&listing_id=$4 [QSA,L]

# wildcard request
RewriteCond %{HTTP_HOST} ^((?!www\.|m\.|mobile\.).*)\..+\.[^/]+$ [NC]
#RewriteCond %{HTTP_HOST} ^((?!www\.|m\.|mobile\.).*)\..+$ [NC] # FIRST LEVEL DOMAIN (localhost) USAGE
RewriteRule (.*) index.php?page=%1&wildcard&rlVareables=$1 [QSA,L]

# account request (sub-directory)
RewriteRule ^((\w{2})/)?([\w-_]{3,})$ index.php?page=$3&lang=$2&account_request [QSA,L]

# define single pages
RewriteRule ^([^//]+)/?(^/*)?.ht(m?ml?)$ index.php?page=$1 [QSA,L]

# define other pages
RewriteRule ^([^//]+)/?(.*)?/?(.*)?(.ht(m?ml?)|/+)$ index.php?page=$1&rlVareables=$2 [QSA,L]

Best Regards,
Tariq

Viktor
October 18, 2013, 05:14 AM
Yes it's your default htaccess file. Your site should work with this htaccess. Where did you added rules for sitemap plugin?

1-st. try to add in end of file. save and check: http://your_site.com/sitemap.xml
If will not work:
2-nd: try to add above:
# define system languages
#RewriteRule ^([a-zA-Z]{2})$ index.php?page=$1 [QSA,L]

save and check this url again: http://your_site.com/sitemap.xml

Tariq hamed Ahmed
October 18, 2013, 05:22 AM
Hello Viktor,

Thank you so much for the great support.

The first option gives me the same server error.

The second option Worked with me very fine and my problem solved.

Best Regards,
Tariq

Viktor
October 18, 2013, 08:42 AM
Hello Tariq,

I am glad to hear it.