WordPress.org

Ready to get started?Download WordPress

Forums

Redirection
Redirections ending with .html not working (2 posts)

  1. shmox
    Member
    Posted 1 year ago #

    Hi, everything is working fine expect urls that ends with .html doesn't redirect, i read that it's an htacess problem here is mine :

    # BEGIN WordPress

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wordpress-test/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /wordpress-test/index.php [L]
    </IfModule>

    # END WordPress

    Can somebody help me to change this to get it working ? :( thanks

    http://wordpress.org/extend/plugins/redirection/

  2. shmox
    Member
    Posted 1 year ago #

    Okay i've figured ou that it wasn't an htaccess file problem at all but the fact that wordpress is installed in a folder inside root server (i'm on windows in localhost).

    What is strange is that url's whith .html extention like this :
    /annuaire-presse-algerienne/journaux/1/el-bilad.html wasn't redirecting (leads to 404 wordpress page) but url like that :
    /annuaire-presse-algerienne/journaux/1/el-bilad redirects well.

    THe solution was to include the folder where wordpress is installed in the url redirect source like this :
    /wordpress-test/annuaire-presse-algerienne/journaux/1/el-bilad.html
    "wordpress-test/" here is the folder where is installed wordpress.

    I prefered hacking the plugin code to delete the folder part in the url ("wordpress-test/" here) so that urls redirections can work even if i migrate my site from localhost to production server.

    Thanks anyway, and this plugin is awesome :-D

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags