how to make URL various extentions?

Community Forums Forums Design Tips and Tricks how to make URL various extentions?

This topic is: not resolved

This topic contains 6 replies, has 3 voices, and was last updated by  Tony-BV 1 month, 1 week ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #47961

    works
    Participant

    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.com
    #48010

    Chris Cree
    Participant

    Since 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.


    #48143

    works
    Participant

    Thank 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.

    #48201

    Chris Cree
    Participant

    To 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”


    #48202

    Chris Cree
    Participant

    My 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#post1049806

    I found that after Googling “htaccess redirect non-existent index.html to root”


    #48204

    Chris Cree
    Participant

    I’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.


    #153502

    Tony-BV
    Participant

    Hi 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

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.