Solved

Redirecting Old Site To New Site

Posted on 2014-11-20
15
157 Views
Last Modified: 2014-12-15
Hi,

I recently changed my url from www.mapslap.me to www.mapslap.it

My hosting company updated the nameservers of the new .it domain and pointed it to the site. I have updated all of the settings within the site to reflect the new domain name.

I am trying to redirect all of the old .me links to the new .it domain.

If you enter mapslap.me you are redirected to mapslap.it which is perfect.

However if i try an old sub page, such as the old contact page - www.mapslap.me/contact - i am not redirected to .it and instead i see a mix of the old page and the style of the new page. (all caches have been cleared)

Here is the redirect settings that i am using:

redirect
I've also noticed that the hosting company has placed a folder name the old domain:

ftp
Can anyone shed any light on this, thanks in advance.
0
Comment
Question by:oo7ml
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 6
  • 3
15 Comments
 
LVL 5

Assisted Solution

by:Aaron
Aaron earned 50 total points
ID: 40455375
I think you can add more redirects... put in the www.mapslap.me/contact to redirect to the .it page version. Usually I handle my own stuff but I think most hosting places will keep your old folders for backup redundancy only. This solution might take a while if you have a lot of different directorys but I believe it should work and if you want you can try just changing the one directory to see if it does.

Best of luck!
0
 

Author Comment

by:oo7ml
ID: 40455391
Thanks Aaron. I thought the wildcard would redirect everything.

Is it not possible to just redirect all mapslap.me/* to mapslap.it
0
 
LVL 5

Expert Comment

by:Aaron
ID: 40455400
I think the wildcard is suppose to but not everything works the way it should but I am pretty sure doing individual would work... Have you tried using another browser and a different computer? I know you said you cleared the cache but browsers have lots of wierd ways to remember things and DNS can sometimes be funny.
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 

Author Comment

by:oo7ml
ID: 40455412
Yeah i have 3 computers connected to 3 different ISPs and they all act the same.

I guess i'll just have to create a rule for each page, thanks.
0
 
LVL 5

Expert Comment

by:Aaron
ID: 40455418
No problem sorry I didn't have a easier solution for you.
0
 
LVL 14

Expert Comment

by:Edwin Hoffer
ID: 40455420
Hello ,

Use the below code in "www.mapslap.me" .htaccess file:

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.mapslap.me/$1 [R=301,L] 

<Files 403.shtml>
order allow,deny
allow from all
</Files>

# Use PHP5 as default
AddHandler application/x-httpd-php5 .php .html .shtml

Open in new window


This will redirect the domain with all pages to the new url like mapslap.me/contact to mapslap.it/contact etc.

Thanks
Edwin
0
 

Author Comment

by:oo7ml
ID: 40455438
Thanks Edwin,

How would that code know to redirect to .it (as there is no mention of .it)

Or should it be placed in the mapslap.it htaccess?
0
 
LVL 14

Expert Comment

by:Edwin Hoffer
ID: 40455539
Ohh sorry just change "mapslap.me" to mapslap.it in the above code.
0
 

Author Comment

by:oo7ml
ID: 40456303
Cool, thank you.
0
 
LVL 14

Expert Comment

by:Edwin Hoffer
ID: 40456647
You are most welcome :)
0
 

Author Comment

by:oo7ml
ID: 40466743
Hi Edwin, this is not working for me.

Can you review you instructions please?

old site: mapslap.me
new site: mapslap.it
0
 
LVL 14

Expert Comment

by:Edwin Hoffer
ID: 40466925
Updated Code:

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.mapslap.it/$1 [R=301,L] 

<Files 403.shtml>
order allow,deny
allow from all
</Files>

# Use PHP5 as default
AddHandler application/x-httpd-php5 .php .html .shtml

Open in new window

0
 
LVL 14

Expert Comment

by:Edwin Hoffer
ID: 40466926
Btw its working fine for me
0
 

Author Comment

by:oo7ml
ID: 40468742
Thanks Edwin,

A few things:

- mapslap.me (old) is not up and running anymore, as when i registered the new domain name, mapslap.it - i just asked the hosting company to point the new domain (.it) to the site files (which were the old mapslap.me files) and then i just updated all of the code in the site from .me to .it

Can you figure this out :-)
0
 
LVL 14

Accepted Solution

by:
Edwin Hoffer earned 450 total points
ID: 40468769
Hello oo7ml,

When I visit mapslap.me it redirect to mapslap.it and when I visit mapslap.me/contact it open the exact URL.

I suggest you to use the below code in your .htaccess file on the root directory:

RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.mapslap\.it$
RewriteRule ^(.*)$ http://mapslap.it/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(([^/]+/)*)index\.html\ HTTP/
RewriteRule index\.html$ http://mapslap.it/%1 [R=301,L]
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteCond %{REQUEST_URI} !/$
RewriteRule (.*) $1\.html [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ /$1 [R=301,L]
<Files 403.shtml>
order allow,deny
allow from all
</Files>

# Use PHP5 as default
AddHandler application/x-httpd-php5 .php .html .shtml

Open in new window


Thanks
Edwin
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question