vBulletin SEO Forums

SEO

vBulletin Search Engine Optimization

Buy vBSEO Now! HACKER SAFE certified sites prevent over 99.9% of hacker crime.
ne nw
vBSEO Team: Hot or Not? Ready for Traffic Explosion? vBSEO 3.2.0 GOLD Has Landed Success with vBSEO = 600ore Web Visitors + $1400 in a Day! vBSEO Helps Forum Earn $100/day from Google AdSense Discover the Power of "Long Tail Search" Crawlability Inc. Files for SEO Technology Patent
se sw

Redirecting Custom Rewrites outside forum folder

This is a discussion on Redirecting Custom Rewrites outside forum folder within the Bug Reporting forums, part of the vBSEO SEO Plugin category; <not 100% sure if this is a bug or a missing feature> One of the really nice features of VBSEO ...

Go Back   vBulletin SEO Forums > vBSEO SEO Plugin > Bug Reporting

Enhancing 80 million pages.

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1  
Old 03-05-2006, 07:28 PM
Senior Member
Big Board Administrator
 
Real Name: vissa
Join Date: Aug 2005
Location: CA, USA
Posts: 133
Question Redirecting Custom Rewrites outside forum folder

<not 100% sure if this is a bug or a missing feature>

One of the really nice features of VBSEO for things that lie within the forum folder is to automatically 301 redirect the old links to the new ones. This servers 2 purposes 1) not to have duplicate content and 2) possibly forward PR value with Google.

My vbagallery lies in /pictures/ and my forum lies in /forums/

I've written some custom rewrite rules for the programs within /pictures/ (browseimages.php and showimages.php) that seem to work pretty well. The problem is, if I type one of the old URLs in my browser, it doesn't 301 redirect. It just displays the old page url. All the old links within the forum have their links rewritten properly and it works when it goes to the rewritten url, but I would like to have these old spidered pages 301 redirect. Is this currently possible (outside forum folder), a missing feature, a bug, etc?


Here is my public_html/.htaccess file (taken from Oleg's post#118 in Custom rewrite for vBA Photogallery & Links?)

Quote:
ErrorDocument 401 /401.html
ErrorDocument 403 /403.html
ErrorDocument 404 /404.html
ErrorDocument 500 /500.html
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !forums/
RewriteCond %{QUERY_STRING} !vbseourl=
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ forums/vbseo.php?vbseourl=$1&vbseorelpath=../&%{QUERY_STRING} [L]
Here are some of my custom rewrites relavent to this
Quote:
'browseimages\.php\?c=(\d+)$' => 'cat-$1.html'
...
'browseimages\.php\?do=popimages&orderby=posts' => 'toppost.html'
...
'showimage\.php\?i=(\d+).*$' => 'photo-$1.html'
'/pictures/index\.php' => '/pictures/'
Thanks
-vissa

Last edited by vissa; 03-05-2006 at 07:42 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2  
Old 03-07-2006, 02:23 PM
Oleg Ignatiuk's Avatar
vBSEO Staff
vBSEO Total Customer SupportvBSEO Documenter
 
Real Name: Oleg Ignatiuk
Join Date: Jun 2005
Location: Belarus
Posts: 20,305
Blog Entries: 1
Re: Redirecting Custom Rewrites outside forum folder

Hello vissa,

you may need to add the following to redirect old urls automatically:
Quote:
RewriteCond %{REQUEST_FILENAME} !forums/
RewriteRule ^(.*\.php)$ forums/vbseo.php?vbseourl=$1&vbseorelpath=../&%{QUERY_STRING} [L]
__________________
Oleg Ignatiuk / Crawlability Inc.
vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations

vBSEO Google Sitemap Generator - Version 2.2 Released Mandatory Upgrade for vBSEO 3.2.0 GOLD

6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 03-07-2006, 06:56 PM
Senior Member
Big Board Administrator
 
Real Name: vissa
Join Date: Aug 2005
Location: CA, USA
Posts: 133
Re: Redirecting Custom Rewrites outside forum folder

That caused all kinds of errors for me.
What happened when I typed an old gallery URL is it directed to the root instead of the picture gallery.

Example URL: http://website/pictures/browseimages.php?c=12

redirected to http://website/cat-12.html
instead of http://website/pictures/cat-12.html

which caused vbseo errors.

Thanks for your help
-vissa
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 03-07-2006, 07:03 PM
Senior Member
Big Board Administrator
 
Real Name: vissa
Join Date: Aug 2005
Location: CA, USA
Posts: 133
Re: Redirecting Custom Rewrites outside forum folder

Which reminds me -- is there a way to make vbseo behave better when there is a problem with custom rewrites? It always outputs a blank white page with php errors (that disclose more that I'd like). Perhaps this could be a feature request for the future. My website has custom 404/etc errors but these aren't triggered with vbseo.

-vissa
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5  
Old 03-08-2006, 03:58 PM
Oleg Ignatiuk's Avatar
vBSEO Staff
vBSEO Total Customer SupportvBSEO Documenter
 
Real Name: Oleg Ignatiuk
Join Date: Jun 2005
Location: Belarus
Posts: 20,305
Blog Entries: 1
Re: Redirecting Custom Rewrites outside forum folder

PM sent
__________________
Oleg Ignatiuk / Crawlability Inc.
vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations

vBSEO Google Sitemap Generator - Version 2.2 Released Mandatory Upgrade for vBSEO 3.2.0 GOLD

6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #6  
Old 03-10-2006, 12:32 PM
Senior Member
Big Board Administrator
 
Real Name: vissa
Join Date: Aug 2005
Location: CA, USA
Posts: 133
Re: Redirecting Custom Rewrites outside forum folder

PM going back.

I just want to say that custom rewrites OUTSIDE/ABOVE the forum folder are extremely dangerous and somewhat buggy/poorly implemented in my opinion. I'm pretty upset right now because I just discovered that after applying the .htaccess noted in my first post (to rewrite gallery pictures), other things (such as my old UBB forum archive) were totally screwed up and started redirecting to my vbulletin forum. I didn't notice this until today. The old UBB archive forum was responsible for a significant amount of adsense revenue and who knows what the search engines will do now that they have been indexing new/bad content.

Needless to say I've removed the custom .htaccess given in my first post and lost my custom photo rewrites for now. It's really dangerous. Perhaps if it could be targeted toward specific folders instead of everything in/below root.

-vissa

Last edited by vissa; 03-10-2006 at 12:46 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #7  
Old 03-10-2006, 01:47 PM
Senior Member
Big Board Administrator
 
Real Name: vissa
Join Date: Aug 2005
Location: CA, USA
Posts: 133
Re: Redirecting Custom Rewrites outside forum folder

OK I had to trash the .htaccess you said to put in root. Please don't take it the wrong way, but I really don't think you should tell anyone to use that because it can really cause a lot of problems. Better to use different .htaccess files in each folder for each program/folder that needs rewriting by vbseo.

What I ended up doing is
within /pictures/.htaccess
Code:
 
RewriteEngine On
RewriteCond %{QUERY_STRING} !vbseourl=
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$  /forums/vbseo.php?vbseourl=$1&vbseorelpath=../pictures/&%{QUERY_STRING} [L]
RewriteCond %{REQUEST_FILENAME} !forum/
RewriteRule ^(.*\.php)$ /forums/vbseo.php?vbseourl=$1&vbseorelpath=../pictures/&%{QUERY_STRING} [L]
using the same vbseo CRRs.

If you put the .htaccess in root like you mentioned in a post, ANY URL that fits a rewrite defined in vbseo (including the built in options for forums, threads, etc) will get rewritten. That can really wreak havoc on big sites with lots of files because I found many that were being rewritten without my knowledge or wanting them to be.

By the way, the last line in the code above fixed the 301 redirect problem that I originally created this thread about.

-vissa
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #8  
Old 03-10-2006, 05:55 PM
Oleg Ignatiuk's Avatar
vBSEO Staff
vBSEO Total Customer SupportvBSEO Documenter
 
Real Name: Oleg Ignatiuk
Join Date: Jun 2005
Location: Belarus
Posts: 20,305
Blog Entries: 1
Re: Redirecting Custom Rewrites outside forum folder

Hello vissa,

thank you for the follow-up!
__________________
Oleg Ignatiuk / Crawlability Inc.
vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations

vBSEO Google Sitemap Generator - Version 2.2 Released Mandatory Upgrade for vBSEO 3.2.0 GOLD

6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads

Thread Thread Starter Forum Replies Last Post
Help moving from root folder to forum folder. Amos General Discussion 4 01-29-2006 09:20 PM
CRR Custom Rewrite Rules for root vissa Custom Rewrite Rules 1 12-05-2005 10:18 AM


All times are GMT -4. The time now is 04:56 PM.


Powered by vBulletin Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.