Dotclear

Vous n'êtes pas identifié(e).

Annonce

13 février 2024 Sortie de Dotclear 2.29

#1 2014-01-11 12:00:52

manikhere
Membre
Inscription : 2014-01-11

301 redirect

I have some old html urls on my domain before I installed dotclear.
Now I want to 301 redierct those old non existing html URLS to dotclear cms homepage but I am unable to do it.

if I put htacess file in root with 301 code then it stops opening the homepage and redirection also do not works.

Please advice how can I properly redirect the pages?

Dotclear is installed in root of my hosting account.

Hors ligne

#2 2014-01-11 12:20:55

Philippe
Stagiaire
Lieu : Toulon
Inscription : 2004-06-13
Site Web

Re : 301 redirect

Hello

Say you have an old.html file at the root of your domain

RedirectPermanent old.html http://www.yourdomain.tld/index.php

The second argument, destination of redirect instruction, must be a full URL

Hors ligne

#3 2014-01-13 08:37:45

manikhere
Membre
Inscription : 2014-01-11

Re : 301 redirect

I already did by putting that code in .htaccess file and uploading it in root directory of dotclear where other default dirctories like themes, plugins, admin, cache etc are there.
I have only that 301 redirect code only in htaccess file.


After doing this the homepage of our dotclear website stops opening.


Is there any other location where I need to upload the htacess file or do i need to put some other code as well there or alter some settings in dotclear admin?

I have URL structure on my blog like http://www.site.com/index.php?post/8-post-title

Hors ligne

#4 2014-01-13 09:08:24

Philippe
Stagiaire
Lieu : Toulon
Inscription : 2004-06-13
Site Web

Re : 301 redirect

If you have this structure

www
   dotclear
      index.php
   old.html

the rewrite should be

RedirectPermanent old.html http://www.yourdomain.tld/dotclear/index.php

and the .htaccess file should be at the root of www folder, where I understand old.html file is. Also, your hosting must allow the use of such files, and the file must be treated by your ftp software as an ASCII file.

If I am mistaken about your structure, could you be more precise ?

Hors ligne

#5 2014-01-17 11:03:30

manikhere
Membre
Inscription : 2014-01-11

Re : 301 redirect

Ok I figured out why my htaccess was not working.

If I put

Redirect 301 /somepage.htm http://www.mysite.com
Then redirect works fine.

But if I use

Redirect 301 /index.htm http://www.mysite.com

Then it does not works.

I think dotclear has some internal code which is anot allowing index.htm to redierct.

Can you advice how could I redirect index.htm as well?

Hors ligne

#6 2014-01-17 11:22:09

Philippe
Stagiaire
Lieu : Toulon
Inscription : 2004-06-13
Site Web

Re : 301 redirect

manikhere a écrit :

I think dotclear has some internal code which is anot allowing index.htm to redierct.

I do not think Dotclear does such a thing, I believe it is your server who gives priority to index.php over index.htm. If you type the full URL of index.htm in your address bar, do you see the page ?

Hors ligne

#7 2014-01-20 11:43:32

manikhere
Membre
Inscription : 2014-01-11

Re : 301 redirect

If I open index.htm then it gives "404 Not Found " error as I have not uploaded that page.
I am just 301 redirecting it via htaccess.

Hors ligne

Vous n'êtes pas identifié(e).

Pied de page des forums

Sites map