Solved

Redirecting Old Site To New Site

Posted on 2014-11-20
15
145 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
  • 6
  • 6
  • 3
15 Comments
 
LVL 5

Assisted Solution

by:Aaron
Aaron earned 50 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
 

Author Comment

by:oo7ml
Comment Utility
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
Comment Utility
No problem sorry I didn't have a easier solution for you.
0
 
LVL 12

Expert Comment

by:Edwin Hoffer
Comment Utility
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
Comment Utility
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
How does your email signature look on mobiles?

Do your employees use mobile devices to reply to emails? With mobile becoming increasingly important to the business world, it is in your best interest to make sure that your email signature looks great across all types of devices.

 
LVL 12

Expert Comment

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

Author Comment

by:oo7ml
Comment Utility
Cool, thank you.
0
 
LVL 12

Expert Comment

by:Edwin Hoffer
Comment Utility
You are most welcome :)
0
 

Author Comment

by:oo7ml
Comment Utility
Hi Edwin, this is not working for me.

Can you review you instructions please?

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

Expert Comment

by:Edwin Hoffer
Comment Utility
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 12

Expert Comment

by:Edwin Hoffer
Comment Utility
Btw its working fine for me
0
 

Author Comment

by:oo7ml
Comment Utility
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 12

Accepted Solution

by:
Edwin Hoffer earned 450 total points
Comment Utility
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

If, like me, you have a lot of Dell servers in the estate you manage this article should save you a little time. When attempting to login to iDrac on any server I would be presented with two errors. The first reads "Do you want to run this applicati…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

772 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now