help redirecting permalinks (7 posts)

  1. Mark_I
    Posted 10 years ago #

    I really need some help. I'm desperate.

    My permalink structure is causing problems. It is the one that is NOT htaccess based and which contains index.php in each post name.

    I would like to remove that part from my permalinks AND THEN set up an htaccess redirect that strips /index.php from all incoming traffic. e.g. google sends traffic with permalinks containing the /index.php. I want to be able to redirect that traffic to the new sans-index.php address.

    Can someone help me with the htaccess code?

    Thanks VERY much to anyone who can help.

  2. niziol
    Posted 10 years ago #

    Maybe you could clarify yourself a bit, in getting rid of the index.php permalinks are you now going to be using .htaccess?

    I found this plug-in: Permalink Redirect WordPress Plugin which may be what you're looking for. If that isn't going to solve your problems, posting back with more details about your situation will help us help you :)

    Good luck,

  3. Mark_I
    Posted 10 years ago #

    Thank you so much for responding, niziol.

    Yes, I want to begin using .htaccess. I wasn't using it at my old domain host (couldn't) and now my new host is changing things so using the non-htaccess permalinks give that "no input file specified" error.

    But, yes, I want htaccess permalinks without the /index.php part embedded in the url.

    Is that enough clarity?

    And thanks, I will take a look at the plugin!

  4. febwa1976
    Posted 10 years ago #

  5. niziol
    Posted 10 years ago #

    I suggested the following .htaccess rewrite rules in this thread for a similar problem as yours:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index.php/(.*)$ /$1 [R=301,L]

    This example assumes you are changing from http://www.example.com/index.php/whatever to http://www.example.com/whatever. So basically everything after the index.php/ would be redirected to / on your server and it would output the 301 permanently moved headers so search engines and the likes will know that it is moved. This is assuming the blog is served from the root (/) of your server, so you may have to adjust the paths accordingly. If the only thing that's changing is index.php part, a simple .htaccess solution like this is may be easiest and most efficient. Let use know how it goes!


  6. Mark_I
    Posted 10 years ago #

    Thanks to both of you! I will give those a try!

    :) Thanks!

  7. bgswm1
    Posted 9 years ago #

    i want to change my permalinks from example.com/entry/post_id to example.com/entry/post_name. is there a way to redirect these since they do not follow the same rules as the one that you suggested niziol?

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.