Forum Moderators: phranque
I really need help... I'm trying to use SEO friendly redirects so that google thinks all my pages are SHTML pages not PHP pages but google is saying that I have redirect errors so it won't crawl the pages!?! Can somebody please help me? Am I doing this wrong? Please don't say "Go to this link, it tells you how to do it" as I have done that many times, trying to learn, and now google says I am wrong... I am stumped, any help would be very much appreciated. My htaccess code is:
suPHP_ConfigPath /home/witch4/public_html/example
<Files php.ini>
order allow,deny
deny from all
</Files>
#
#Start Rewrite Engine
RewriteEngine on
#
#Rewrite All Requests To non-WWW Equivalents
rewritecond %{http_host} ^www.example.com
rewriterule ^(.*)$ http://example.com/$1 [r=301,L]
rewriterule ^blog/(.*) /dynamic/blogmore.php?file=$1 [L]
rewriterule ^news/(.*) /dynamic/newsmore.php?file=$1 [L]
rewriterule ^blog(.*).shtml /dynamic/blog.php?page=$1 [L]
rewriterule ^feeds.shtml /about.shtml [L]
rewriterule ^rssfeed/blog.xml /dynamic/blogfeed.php [L]
rewriterule ^rssfeed/news.xml /dynamic/newsfeed.php [L]
ErrorDocument 404 http://example.com
ErrorDocument 500 http://example.com
ErrorDocument 401 http://example.com
ErrorDocument 400 http://example.com
ErrorDocument 403 http://example.com
[edited by: encyclo at 10:43 pm (utc) on Mar. 3, 2007]
[edit reason] examplified, see TOS [webmasterworld.com] [/edit]
suPHP_ConfigPath /home/witch4/public_html/example
<Files php.ini>
order allow,deny
deny from all
</Files>
#
# Syntax correction only -- It is a VERY BAD idea to map all errors to
# your home page. You risk duplicate-content penalties and confused users.
# Either provide friendly/informative custom error documents, including a link
# to your home page and/or site map, or do not use the ErrorDocument feature.
ErrorDocument 400 /
ErrorDocument 401 /
ErrorDocument 403 /
ErrorDocument 404 /
ErrorDocument 500 /
#
#Start Rewrite Engine
RewriteEngine on
#
# Rewrite all www- requests to non-www equivalents
#
# Escape literal periods in regex patterns
RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteRule (.*) http://example.com/$1 [R=301,L]
#
# Most-specific rules must go first
RewriteRule ^blog([^.]*)\.shtml$ /dynamic/blog.php?page=$1 [L]
RewriteRule ^blog/(.+)$ /dynamic/blogmore.php?file=$1 [L]
RewriteRule ^news/(.+)$ /dynamic/newsmore.php?file=$1 [L]
RewriteRule ^feeds\.shtml$ /about.shtml [L]
RewriteRule ^rssfeed/blog\.xml$ /dynamic/blogfeed.php [L]
RewriteRule ^rssfeed/news\.xml$ /dynamic/newsfeed.php [L]
Jim