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 5 replies, has 2 voices, and was last updated by  Chris Cree 1 year, 2 months ago.

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

    works
    Participant
    Post count: 36

    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
    Post count: 147

    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
    Post count: 36

    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
    Post count: 147

    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
    Post count: 147

    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
    Post count: 147

    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.


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

You must be logged in to reply to this topic.