Moved forum from a subdirectory to root, how to save indexed links?

Started by saurabh1938, January 26, 2015, 06:26:26 AM

Previous topic - Next topic

saurabh1938

Hi All,

Due to various reasons, I needed to move my forum from www.site.com/gt to root www.site.com  but now the issue is all my links are indexed and also there are many other back links from other sites. I want to preserve and redirect all those links. I want to redirect any url www.site.com/gt/somepathforcontent to www.site.com/somepathforcontent

please help before I start losing my indexed pages.
Visit my forum : www.gotripperz.com

margarett

Are you using Pretty URLs?

If not, it should be possible to set a .htaccess permanent redirect (although I honestly don't know how to do it) so that everything that pops from site.com/gt/whatever is forwarded to site.com/whatever
This should prevent your indexed content from being lost, while new content will be indexed normally.

With Pretty URLs I'm not sure if it's that simple.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

saurabh1938

I am using pretty urls... And it adds lot of complications... But need to do this
Visit my forum : www.gotripperz.com

margarett

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

saurabh1938

Just help me how to configure or redirect this thing in htaccess even if i was not using pretty urls... I can give it a try
Visit my forum : www.gotripperz.com

margarett

Quote from: margarett on January 26, 2015, 06:32:57 AM
(...) set a .htaccess permanent redirect (although I honestly don't know how to do it)
:(
You will need to wait for further advice...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Kindred

because pretyurls already changes the htaccess file - you are going to have to ask in the mod support topic since any advice that we give you for a standard change will not be relevant.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

saurabh1938

I finally did this, and it is running beautifully with pretty urls using the following code :

RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.mydomain.com
RewriteRule ^gt/(.*)$ http://www.mydomain.com/$1 [L,R=301]


I started working on this in first week of january, wanted my site to be compatible with pretty urls and at the same time with 301 permanent redirect it took my lot of research and many changes in htaccess and inbetween posts and replies stopped working and also faced many issues but this was the last change I wanted to do to save my links and now got everything working now which I wanted to achieve.
Visit my forum : www.gotripperz.com

Advertisement: