Vous n'êtes pas identifié(e).
13 février 2024 Sortie de Dotclear 2.29
Pages : 1
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
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
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
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
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
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
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
Pages : 1
Vous n'êtes pas identifié(e).