Recent Topics

1 Jan 25, 2009 06:37    

My b2evolution Version: 2.x

<sigh> I have had an incredibly annoying day, problems with Google indexing and what not due to not having an appropriate redirect setup on my page. I finally found a solution (with the help of the Google webmasters forum) that seems to have fixed the discrepancy (or at least my queries are returning in the top 100 again), but now I have another problem, the preview function output in B2E is being redirected to the canonical address instead of displaying a preview. I'm not a programmer, but I'm sure it's because of the changed contents of my .htaccess file redirecting EVERYTHING. Please see the code below and to see if I can make changes such that the preview functionality will be restored - any help would be greatly appreciated!

Options +FollowSymlinks
RewriteEngine on
RewriteBase /


### re-direct index.html to root / ###
RewriteCond %{THE_REQUEST} ^.*\/index\.html\ HTTP/
RewriteRule ^(.*)index\.html$ /$1 [R=301,L]

 

### re-direct index.htm to root / ###
RewriteCond %{THE_REQUEST} ^.*\/index\.htm\ HTTP/
RewriteRule ^(.*)index\.htm$ /$1 [R=301,L]

 

### re-direct index.php to root / ###
RewriteCond %{THE_REQUEST} ^.*\/index\.php\ HTTP/
RewriteRule ^(.*)index\.php$ /$1 [R=301,L]

 

### re-direct default.html to root / ###
RewriteCond %{THE_REQUEST} ^.*\/default\.html\ HTTP/
RewriteRule ^(.*)default\.html$ /$1 [R=301,L]

 

### re-direct home.html to root / ###
RewriteCond %{THE_REQUEST} ^.*\/home\.html\ HTTP/
RewriteRule ^(.*)home\.html$ /$1 [R=301,L]

 

### re-direct IP address to www

### re-direct non-www to www

### re-direct any parked domain to www of main domain
RewriteCond %{http_host} !^www.imafoodblog.com$ [nc]
RewriteRule ^(.*)$ http://www.imafoodblog.com/$1 [r=301,nc,L]
####

2 Jan 26, 2009 02:44

Just wanted to let everyone know that this is no longer an urgent issue, as I have managed to work around the preview being broken by commenting out:

### re-direct index.php to root / ###
###RewriteCond %{THE_REQUEST} ^.*\/index\.php\ HTTP/
###RewriteRule ^(.*)index\.php$ /$1 [R=301,L]

as B2E uses the /index.php for the preview feature. This is clearly not an optimal solution, as now all requests for /index.php are not redirect to the canonical (like everything else) but in lieu of a better work around this is what I am going to go with for now.

Also, I want to go on record saying that I have only a limited understanding of why this works and the solution came out of pulling hair out my head for the past 24 hours until I found some change in the edited .htaccess file that brought back the preview feature.


Form is loading...