WordPress.org

Ready to get started?Download WordPress

Forums

Changing permalinks not redirect the old to the new (30 posts)

  1. dannymoe34
    Member
    Posted 2 years ago #

    I want to change my permalinks but the old ones (default permalinks) not redirect to the new one, this is a problem for who want to change the permalinks

  2. Johnb81
    Member
    Posted 2 years ago #

    HI,

    Can you be more specific? What rules are you using in the permalinks? Also if the old posts URLs are not being changed, what about the new ones you create? Do they get the new URL?

  3. dannymoe34
    Member
    Posted 2 years ago #

    I use wordpress on iis server. I have an active blog installed in blog folder with default permalinks example.com/blog/?p=123 and I want to use wordpress as cms so the page permalinks will be example.com/page-name

    There is option to change the permalinks only for the pages and for the posts to stay with the default permalinks on example.com/blog/?p=123 ?

    I tried to change the permalinks to /blog/%postname% it works but when I go to example.com/blog/?p=123 it not redirect to the new ones. I read another post here on the forum and I see that this is a problem on 3.4 version of wordpress. How I fix it?

  4. Johnb81
    Member
    Posted 2 years ago #

    It is not a problem with WordPress 3.4. It is more an issue of IIS not supporting it properly. In that case I would recommend configuring the redirects in IIS.

    http://www.iis.net/ConfigReference/system.webServer/httpRedirect

  5. dannymoe34
    Member
    Posted 2 years ago #

    It's problem on 3.4 version, a lot of users reported this bug and also appear on other servers.

    You have any soloution for me? What you recommend me to do?

  6. jkohlbach
    Member
    Posted 2 years ago #

    I'd second Johnb81's opinion first up. Can you point us to the other reports?

    As for another solution you could try a plugin like redirection, though if you have a lot of posts that might be a bit of a headache.

  7. dannymoe34
    Member
    Posted 2 years ago #

  8. Johnb81
    Member
    Posted 2 years ago #

    I, like many others didn't experience such issue. Also keep in mind that all other users in that ticket are using Apache. IIS is a different kind of animal. So it could be related to a specific install scenario. As suggested in the previous ticket, did you try to disable all the plugins and change to default theme temporarily?

    Once all is switched off, can you reproduce the problem?

  9. dannymoe34
    Member
    Posted 2 years ago #

    the pretty permalinks works for me well without any problem and also in the pervious versions the permalinks redirects was working.

    You use any plugin to redirect your old permalinks to the new ones?

  10. peredur
    Member
    Posted 2 years ago #

    I have a local version of WordPress. I've just uninstalled it and reinstalled it several times. Each time, on reinstall, I've checked that all is well, and it is.

    I then change the permalinks, but make no other alterations to the default setup, and all pages and single posts become unreachable (404).

    Ubuntu 12.04LTS Apache2 5.3.10-1ubuntu3.2

  11. dannymoe34
    Member
    Posted 2 years ago #

    Any soloution for it? this is huge problem for seo

  12. Johnb81
    Member
    Posted 2 years ago #

    Offhand it is very difficult to say. Ideally you can send me a backup of your website (not over this forum as it would contain sensitive data), we install it locally and see how it works. Then we can start troubleshooting from there.

  13. peredur
    Member
    Posted 2 years ago #

    If other people have the same experience as me, in that it happens on a virgin install, I wouldn't have thought a backed up site would be necessary.

    Cheers

    PAE

  14. Pioneer Valley Web Design
    Member
    Posted 2 years ago #

    IF that is true, then restart and take the advise given here, always back up and always do so each time you mod a file (each file at least). Take careful notes about what changes you have made. Include comments in changed files properly.

  15. Ubuntu 12.04LTS Apache2 5.3.10-1ubuntu3.2

    Odd, I'm using the same distro and it works on my test install. I also zapped it for something else but these commands should work.

    Confirm that mod_rewrite is active

    $ sudo a2enmod rewrite

    Are you using a virtual host? Check that you have something like this for the vhost in /etc/apache2/sites-enabled/

    <Directory />
                    Options FollowSymLinks -Indexes
                    AllowOverride All
            </Directory>

    and that that site is enabled.

    $ a2ensite your-site-config
  16. dannymoe34
    Member
    Posted 2 years ago #

    someone tried the fix on the ticket?

  17. peredur
    Member
    Posted 2 years ago #

    @Jan Dembowski:

    Mod re_write was not active, but activating it did not appear to fix the problem:

    peter@peredur:~$ sudo a2enmod rewrite
    [sudo] password for peter:
    Enabling module rewrite.
    To activate the new configuration, you need to run:
      service apache2 restart
    peter@peredur:~$ sudo service apache2 restart
     * Restarting web server apache2
    apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
     ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
                                                                             [ OK ]
    peter@peredur:~$

    I'm not using a virtual host.

    Funny, this, because I've never had a problem on previous versions of Ubuntu. Everything just worked.

    Obviously the pretty permalinks are not the end of the world on a test site like this, but I do like to develop on something that looks as similar as possible to the real thing.

    So if you or anyone else has any suggestions, I'd certainly follow them up.

    Cheers, and thanks for the help

    PAE

  18. Mod re_write was not active

    I'm glad you've activated it. ;)

    I'm not using a virtual host.

    I'm biased, as using vhosts let me keep my configurations separate in /etc/apache2/site-available.

    I think the problem is that the /etc/apache2/sites-available/default file doesn't have an AllowOverride All in it.

    Make a duplicate of that default file and locate the Directory portion for /var/www and see if you can add that one line to the that section.

    Restart Apache2 and re-save your permalinks. If all goes well you will now have it working.

  19. dannymoe34
    Member
    Posted 2 years ago #

    Jan, What about IIS server?

  20. Dunno, I don't personally have access to an IIS server.

    I do apologize. Peredur and I have completely run over your issue with IIS and I should not have done that. That was impolite of me.

    @peredur, please start your own thread and we'll continue there.

    @dannymoe34, I'll ask around, if I find a solution there I'll post it here.

    Meanwhile from the codex http://codex.wordpress.org/Using_Permalinks

    • Microsoft IIS 7+ web server with the URL Rewrite 1.1+ module and PHP 5 running as FastCGI
    • Microsoft IIS 6+ using ASAPI_Rewrite

    Which version of IIS are you using? Apparently different version handle rewrite differently.

  21. dannymoe34
    Member
    Posted 2 years ago #

    I use IIS 7.5. The permalinks is working perfect but the redirect from the old permalinks to the new one not working and also both of them accssible so it can hurt seo.

    I installed wordpress on example.com/blog/ and now I want to use it as cms so my page permalink will be example.com/page-name so I need to move wordpress. I have an active blog with a lot of posts so the redirection of them is very important for me. What you suggest me to do? There is option to stay with the default permalinks at example.com/blog/?p=123 and use pretty permalinks only for pages?

    Thank you

  22. peredur
    Member
    Posted 2 years ago #

    It seems that the default Ubuntu setup considers this to be a virtual host. I didn't know that...

    <VirtualHost *:80>
    	ServerAdmin webmaster@localhost
    
    	DocumentRoot /var/www
    	<Directory />
    		Options FollowSymLinks
    		AllowOverride None
    	</Directory>
    	<Directory /var/www/>
    		Options Indexes FollowSymLinks MultiViews
    		AllowOverride None
    		Order allow,deny
    		allow from all
    	</Directory>
    ...
    </VirtualHost>

    I changed both instances of AllowOverride None to AllowOverride All and everything works just fine.

    I'm extremely grateful to you. Thanks.

    Now all I have to do is to remember this the next time it happens...

    :-)

    Cheers

    PAE

  23. peredur
    Member
    Posted 2 years ago #

    My apologies, too. I should have read the initial posts more carefully.

    Cheers

    PAE

  24. I use IIS 7.5. The permalinks is working perfect but the redirect from the old permalinks to the new one not working and also both of them accssible so it can hurt seo.

    Gotcha: permalinks working, old redirection of old permalinks to the new ones, not working.

    On a non-IIS server I would (and have) relied on canonical URLs to sort it out and if that didn't work use .htaccess. But for IIS that apparently isn't working for you.

    I'll keep looking, but I lack IIS experience to answer why canonical URLs are not working for you.

  25. dannymoe34
    Member
    Posted 2 years ago #

    The question is the redirect problem is bug on 3.4? or only appear on IIS server?

    You have a soloution for me so I can continue to use my blog with the default permalinks as example.com/blog/?p=123 but the pages will be at example.com/page-name, any idea?

  26. dannymoe34
    Member
    Posted 2 years ago #

    Another question, If I move wordpress to root what happen to the another folders who not related to wordpress for example.com/forum/?

  27. Johnb81
    Member
    Posted 2 years ago #

    Subfolders will still work without any problems.

  28. dannymoe34
    Member
    Posted 2 years ago #

    John, also if I change to pretty permalinks, There is no any conflict?

  29. Johnb81
    Member
    Posted 2 years ago #

    No permalinks will not affect sub directories.

  30. dannymoe34
    Member
    Posted 2 years ago #

    Thank you john

Topic Closed

This topic has been closed to new replies.

About this Topic