Miscellaneous ⇒ Search Engines :: Archives ⇒ htaccess rule to redirect all /forums traffic to /forumspro :: Archived ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexSearch Engines

Archived ⇒ htaccess rule to redirect all /forums traffic to /forumspro


I want to do this to remove all the Forums links in the Google Index. devon told me that a topic for the same exists here but I have tried for quite sometime now but in vain. Can anybody help me out with this please?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/2.0.54 (Unix)/5.0.51/5.2.6/DragonflyCMS 9.2.1


Not sure, but try this:

RewriteRule ^Forums/viewforum/f=([0-9]*).html Forums_Pro/viewforum/f=$1.html RewriteRule ^Forums/viewtopic/t=([0-9]*).html Forums_Pro/viewtopic/t=$1.html RewriteRule ^Forums/c=([0-9]*).html Forums_Pro/c=$1.html

www.greenday2k.net

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Use those lines BEFORE:

RewriteRule ^index\.html /index.php

www.greenday2k.net

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Thanks man but which .htaccess file should I put them in and where should I be putting it? No idea about that as well.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/2.0.54 (Unix)/5.0.51/5.2.6/DragonflyCMS 9.2.1


I figured out that you were talking about the file in the site root.

# if you use LEO and CPG-Nuke is installed in a sub-directory like '/html', # remove that # before RewriteBase and rename /html to the path of the sub-directory # RewriteBase /html RewriteRule ^Forums/viewforum/f=([0-9]*).html Forums_Pro/viewforum/f=$1.html RewriteRule ^Forums/viewtopic/t=([0-9]*).html Forums_Pro/viewtopic/t=$1.html RewriteRule ^Forums/c=([0-9]*).html Forums_Pro/c=$1.html # RewriteRule ^index\.html /index.php

I have added it and it looks something like what I have pasted above. Am I correct or not?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/2.0.54 (Unix)/5.0.51/5.2.6/DragonflyCMS 9.2.1


# if you use LEO and CPG-Nuke is installed in a sub-directory like '/html',
# remove that # before RewriteBase and rename /html to the path of the sub-directory
# RewriteBase /html
RewriteRule ^Forums/viewforum/f=([0-9]*).html ForumsPro/viewforum/f=$1.html
RewriteRule ^Forums/viewtopic/t=([0-9]*).html ForumsPro/viewtopic/t=$1.html
RewriteRule ^Forums/c=([0-9]*).html ForumsPro/c=$1.html
# RewriteRule ^index\.html /index.php


Sorry, is not Forums_Pro, but ForumsPro or your installation folder name.

www.greenday2k.net

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Thanks for all the help but there seems to be a small problem. When I switched to Forums Pro I had not switched LEO on. Therefore this is how all the Forum pages indexed in the Google Search look like.

www.radopod.com/index....&t=145

I need to redirect the Bots from this to what I am using now i.e. Forums Pro with LEO on. Can you suggest me something specifically for this?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/2.0.54 (Unix)/5.0.51/5.2.6/DragonflyCMS 9.2.1


Add this rule

# RewriteBase /html
RewriteRule ^index.php?name=Forums&file=viewtopic&t=([0-9]*)
index.php?name=ForumsPro&file=viewtopic&t=$1

www.greenday2k.net

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


This is what it looks like now

# RewriteBase /html RewriteRule ^index.php?name=Forums&file=viewtopic&t=([0-9]*) index.php?name=ForumsPro&file=viewtopic&t=$1 # RewriteRule ^index\.html /index.php

Am I correct?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/2.0.54 (Unix)/5.0.51/5.2.6/DragonflyCMS 9.2.1


Tried it on my site and it gives a 500 Internal Server error while trying to open the site. I have been able to restore the site by placing a correct .htaccess file but would you suggest me to try something else that works please?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/2.0.54 (Unix)/5.0.51/5.2.6/DragonflyCMS 9.2.1


Can you give me the entire code how it looks so that I can just copy and paste it in case I am missing something here!

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/2.0.54 (Unix)/5.0.51/5.2.6/DragonflyCMS 9.2.1


Can you please explain me what these are for

([0-9]*) and $1

I would like to extend this great feature to block more stuff on my site. As for the Forums I am using a line of code derived from what you have suggested.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/2.0.54 (Unix)/5.0.51/5.2.6/DragonflyCMS 9.2.1


Another doubt that I have. Now that I have setup the .htaccess file will it redirect anyone trying to access the page. If so I have tried it but it doesen't seem to be redirecting.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/2.0.54 (Unix)/5.0.51/5.2.6/DragonflyCMS 9.2.1


www.widexl.com/scripts...write.html

www.greenday2k.net

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


I seriously think that if I were able to understand all that is given on the page I would be asking for help here.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/2.0.54 (Unix)/5.0.51/5.2.6/DragonflyCMS 9.2.1

All times are UTC