Community Forums › Forums › Archived Forums › Design Tips and Tricks › how to make URL various extentions?
Tagged: URL extensions
- This topic has 6 replies, 3 voices, and was last updated 9 years, 6 months ago by Tony-BV.
-
AuthorPosts
-
June 26, 2013 at 10:04 pm #47961worksMember
Need to improve my old messy site which suddenly started to bring some AdSense earnings.
1. Need to choose a theme, design etc.
2. Need to keep .html on old indexed pages, and i am thinking of new pages to have no extensions.
Until now I used free plugin called .html on PAGES for that, it worked perfectly as the plugin is only a couple of lines of code (very light) and never required any updates or other problems. But it is uniformal for all pages. I need new pages have no extensions.
How can i build new pages without any extension in the end? Is there a way?
Or is there a theme that allows to choose extension of each individual page?
Thank you in advance.
http://japanmylove.comJune 27, 2013 at 6:58 am #48010Chris CreeParticipantSince you've only got 148 pages indexed in Google it's probably easiest to take care of the change in permalink structure via your .htaccess file rather than with a plugin. You can redirect the old .html extension URL's to the new clean URLs.
Yoast's post on How to Change Your Permalink Structure is a good place to start. But with that small number of pages you can even list each page individually in you .htaccess file and be done with it.
June 27, 2013 at 6:58 pm #48143worksMemberThank you so very much, i appreciate it.
All pages but one redirect like magic.
The only page that does not want to redirect now is Homepage. (probably because my homepage was not called index?)
How do i make my homepage redirect properly, i wonder.June 28, 2013 at 7:18 am #48201Chris CreeParticipantTo get your index.html URL redirected to your root directory I think you're going to need to add something to your .htaccess file along these lines.
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /([^/]*/)*index.(html?|php)(?[^ ]*)? HTTP/ RewriteRule ^(([^/]*/)*)index.(html?|php)$ http://www.japanmylove.com/$1 [R=301,L]
I found that code here: http://www.webmaster-talk.com/website-and-server-administration-forum/208724-301-redirect-index-html-to-root.html#post1049806
after Googling "htaccess redirect non-existent index.html to root"
June 28, 2013 at 7:20 am #48202Chris CreeParticipantMy previous post got eaten, probably because the system didn't like the .htaccess code I posted. But look here for some code to add to your .htaccess file:
http://www.webmaster-talk.com/website-and-server-administration-forum/208724-301-redirect-index-html-to-root.html#post1049806I found that after Googling "htaccess redirect non-existent index.html to root"
June 28, 2013 at 7:25 am #48204Chris CreeParticipantI've tried to post a link to a solution to your problem here twice but the posts get blocked by the forum software. Try Googling "htaccess redirect non-existent index.html to root" and I think you'll find an answer to your problem.
May 24, 2015 at 1:23 pm #153502Tony-BVParticipantHi Chris, I currently have a website http://www.isotonicsupplementstore.com which is not mobile friendly so I'm thinking of recreating on WordPress the only problem is I don't want to loose the original url's. Is there a way to have the WordPress page url's to end with .html? I'm getting a lot of traffic on them so I did not want to lose any SEO. Thanks in advance. Tony
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.