Tag Archives: URL

Creating a Link to Custom View of Custom Google Map

So there is a pretty good amount of information out there about how to customize your view on regular Google Maps. However, several of the API methods do not work when trying to view your own custom map. I am not sure why this is, but it is annoying. After some research and some experimentation I found a small set of variables that the API does accept and work as of writing this article. Hopefully this will be helpful for you as I write many things in here simply as references for my own use when working on my many websites.

This works on your own custom maps you create with Google Maps. The idea is to have one custom map that shows many things. In may case a map of Colorado camping locations.  I write reviews of these campgrounds and want to include a link to my map. But that link needs to zoom into the campground and to center it in the screen.

Camp Out Colorado Campsite Map Normal View

To accomplish this we simply build a url with the proper parameters so that when the user is redirected to the map it also zooms in and centers on the specific campsite.

What We Need to Create a Custom View of Custom Google Map

Custom Map ID

This is found in the URL of the base custom map.

Camp Out Colorado Campground Map: https://www.google.com/maps/d/viewer?hl=en&authuser=0&mid=1NOd9T5rPujjSZ1h7bQ0CX_x-jEE

What we are looking for is mid. Grab everything that is after the “=” and before the “&” if it is there.

Longitude and Latitude

This can easily be found by opening a normal Google Map and select “What’s here?” This will give you a small infobox with what is there along with the exact longitude and latitude. Copy that.

In my case it is: 39.34385,-106.61257

Zoom Level

This is up to you. I like a zoom of 10-14 depending on how close in you want your map to zoom. I have a lot of campsites on the map and many are relatively close to each other. So I zoom in close to really make sure they know which one it is.

Create Link to Custom View of Custom Google Map

Start with the map viewer;

  • https://www.google.com/maps/d/viewer?

Then add your map id;

  • mid=1NOd9T5rPujjSZ1h7bQ0CX_x-jEE

Then add your zoom index, make sure to begin separating parameters with “&”.

  • z=14

Lastly add in your longitude and latitude together in one parameter.

  • ll=39.34385%2C-106.61257

So the final URL looks like;

https://www.google.com/maps/d/viewer?mid=1NOd9T5rPujjSZ1h7bQ0CX_x-jEE&z=14&ll=39.34385%2C-106.61257

There are other things that can be done but I will not go into those now. This should help to be able to simply create a custom map link that will zoom into the required spot.

Please let me know if you have any questions or suggestions to make this easier or better.

Now, to figure out how to embed a zoomed in custom map into a page.

 

VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Remove Date from WordPress Permalink URLs for SEO with htaccess

When using WordPress for your website it will default to the standard URL format showing the page number. However, many of us have changed or initially set up our WordPress blogs using the dates in the URL’s such as imageinnovationsllc.com/2013/1/my-blog-post. Initially you might think that the date in the URL may be helpful for visitors to your website to help them know when an article was initially written. It may be helpful, but has been shown to actually hurt your website. Visitors might not have confidence in an older article, even if it is a great article and valid the day they visit it. Most importantly though, it clutters up your URL and ultimately will hinder your search engine rankings.

WordPress permalink setting allows bloggers to customize the structure of a URL. Doing so correctly will help your WordPress website to be search engine optimized, improve the aesthetics, usability, and forward-compatibility of navigation and links. Within WordPress’s Permalinks setting, WordPress presents a few common permalinks structure, of which at least two are date-based.

The data-based permalinks have the following URL structure:

Year/Month/Day/Post-Title: http://www.imageinnovationsllc.com/2013/02/20/sample-post/
Month/Day/Post-Title: http://www.imageinnovationsllc.com/2013/02/sample-post/

The date in URL unnecessary adds to the length of URL, can dissuade visitors, and hurt SEO. The best SEO practice is to strike off and remove the /yyyy/mm/dd or /yyyy/mm from the URL structure of the WordPress permalinks.

Here’s a quick tutorial on how to change the permalinks structure of your WordPress websites URLs with proper redirect in the .htaccess file. This will help your WordPress website to avoid 404 page not found errors and minimize the loss of traffic due to incoming out of date URL’s any links to your website. This will help your navigation, make your site more user friendly, improve your SERPs, and Google’s PageRank.

The URL’s of your WordPress premalinks will end up in this format: http://www.imageinnovationsllc.com/sample-post/ This should be the format that most WordPress websites or any other website should strive for. It is clear and concise and will help users and search engines better understand and use your website.

  1. First change the permalinks configuration in your Worpress. Go to the WordPress Dashboard of your website and navigate to Settings -> Permalinks.
  2. Select Post name in WordPress Permalink Settings..
  3. Select Save Changes in WordPress Permalink Settings.
  4. FTP or SSH into the web server which hosts the WordPress installation, and go to the directory where the .htaccess file is located for the site. This should be in the WordPress website root directory.
  5. Create a copy of the .htaccess file. Sample: .htaccess_backup
  6. Edit the .htaccess file directly. OR Download the .htaccess file and edit it locally. Then upload it when you are done.
  7. Edit the .htaccess with editor such as notepad, Wordpad, or any other text file editor.
  8. Add one of the two code blocks below depending on your old URL structure above the WordPress code in your .htaccess file.

For existing permalinks with /%year%/%monthnum%/%day%/%postname%/:

RewriteEngine On
RewriteBase /
RewriteRule ^([0-9]+)/([0-9]+)/([0-9]+)/(.*)$ /$4 [R=301,NC,L]

For existing permalinks with /%year%/%monthnum%/%postname%/:

RewriteEngine On
RewriteBase /
RewriteRule ^([0-9]+)/([0-9]+)/(.*)$ /$3 [R=301,NC,L]

  1. Save the WordPress .htaccess file.
  2. Immediately test your WordPress website. Any error in the code can easily shut down your site with server errors. Access your WordPress website to be sure it is still functional. If it is not. Replace the edited .htaccess file with your backup or change the file back to how it was. Then try to enter the code again.
  3. With your WordPress website working enter a few links with the old URL structure to test that the redirection is working properly.

You may want to utilize MySQL replace function to replace the links with old permalink structure in posts, pages and comments to new URLs directly in database, much like what is been done when moving WordPress to new domain or location. Useful when you have thousands of articles which make manual changing impossible.

You can easily track problem URL’s with Google Webmaster Tools. This is an invaluable to keep track of the health of your site and to discover and correct issues that may be hurting your SEO and Google rankings.

VN:F [1.9.22_1171]
Rating: +1 (from 1 vote)