0

I tried to redirect a page '/page-one' to '/page/one/' just using Redirect directives but it doesn't work. I tried several options but none of them make it works:

Redirect 301 /page-one /page/one/
Redirect permanent /page-one /page/one/
Redirect 301 /page-one https://www.example.com/page/one/

Please find below the whole apache2.conf file I am using in my project:

<VirtualHost xx.xxx.xx.xx:8080>
    ServerName example.com
    ServerAlias www.example.com
    redirect / https://www.example.com/
    Redirect 301 /page-one /page/one/
    DocumentRoot /home/admin/web/example.com/public_html
    <Directory /home/admin/web/example.com/public_html>
        AllowOverride All
        Options +Includes -Indexes +ExecCGI
        php_admin_value open_basedir /home/admin/web/example.com/public_html:/home/admin/tmp
        php_admin_value upload_tmp_dir /home/admin/tmp
        php_admin_value session.save_path /home/admin/tmp
        <Files *.php>
          SetHandler fcgid-script
        </Files>
        FCGIWrapper /home/admin/web/example.com/cgi-bin/fcgi-starter .php
    </Directory>
    <Directory /home/admin/web/example.com/stats>
        AllowOverride All
    </Directory>
    <Directory "/home/user1/public_html">
       AllowOverride All
    </Directory>
    IncludeOptional /home/admin/conf/web/apache2.example.com.conf*
</VirtualHost>

Any suggestions are welcome! Thanks!

JFraper
  • 46
  • 3
  • In the documentation (I checked v2.4), all examples enclose the paths in double quotes. Try it out, it might be just that. `Redirect permanent "/page-one" "/page/one/"` – Nic3500 Nov 21 '17 at 01:57
  • Thanks @Nic3500! I also tried using double quotes, but it didn't work. However, if I copy the same lines in the .htaccess file, it works – JFraper Nov 21 '17 at 17:21

0 Answers0