?
Solved

Redirecting Old Site To New Site

Posted on 2014-11-20
15
Medium Priority
?
160 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 200 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
The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

 

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 15

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 15

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 15

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 15

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 15

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 15

Accepted Solution

by:
Edwin Hoffer earned 1800 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

Major Serverless Shift

Comparison of major players like AWS, Microsoft Azure, IBM Bluemix, and Google Cloud Platform

Question has a verified solution.

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

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

770 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