• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 170
  • Last Modified:

Redirecting Old Site To New Site

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
oo7ml
Asked:
oo7ml
  • 6
  • 6
  • 3
2 Solutions
 
AaronSystems Administrator & DSTCommented:
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
 
oo7mlAuthor Commented:
Thanks Aaron. I thought the wildcard would redirect everything.

Is it not possible to just redirect all mapslap.me/* to mapslap.it
0
 
AaronSystems Administrator & DSTCommented:
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
Evaluating UTMs? Here's what you need to know!

Evaluating a UTM appliance and vendor can prove to be an overwhelming exercise.  How can you make sure that you're getting the security that your organization needs without breaking the bank? Check out our UTM Buyer's Guide for more information on what you should be looking for!

 
oo7mlAuthor Commented:
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
 
AaronSystems Administrator & DSTCommented:
No problem sorry I didn't have a easier solution for you.
0
 
Edwin HofferTechnical ExpertCommented:
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
 
oo7mlAuthor Commented:
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
 
Edwin HofferTechnical ExpertCommented:
Ohh sorry just change "mapslap.me" to mapslap.it in the above code.
0
 
oo7mlAuthor Commented:
Cool, thank you.
0
 
Edwin HofferTechnical ExpertCommented:
You are most welcome :)
0
 
oo7mlAuthor Commented:
Hi Edwin, this is not working for me.

Can you review you instructions please?

old site: mapslap.me
new site: mapslap.it
0
 
Edwin HofferTechnical ExpertCommented:
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
 
Edwin HofferTechnical ExpertCommented:
Btw its working fine for me
0
 
oo7mlAuthor Commented:
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
 
Edwin HofferTechnical ExpertCommented:
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

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

  • 6
  • 6
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now