Changing SPIP site directory

Hello,

My SPIP site is in a sub-directory. In the root directory, I have now the old static one designed by simple html. I want to move all old html files to a sub-directory, and move SPIP site to the root.

If I move, search engines may not index all SPIP pages including articles that are created since 2007. Of course, I will work with google webmaster tools. But is there any solution from SPIP end to get indexed faster? I’ll probably change URLs from spip.php?article12 to Titre-de-l-article.html -Rubrique-.html or Titre-de-l-article Rubrique.

Thank you

Kamran

Hi,

of course it’s better to change the url format (because you will start from fresh on the new website). SPIP will manage that for you.

You can create 301 redirections with htaccess rules (/sub/spip.php?article12 => /spip.php?article12).

And you can also customize the url management so that

/sub_directory/spip.php?article12 redirects to /Article-title.html

(it’s better because you only use one 301, instead of 2 with htaccess + proper url format)

Hi,
I want to use the same database. If I change URL, it will effect the old spip site as well. Right?
There are thousants of artcles in my SPIP site, Can I use 301 redirection with a single line?
Kamran

On Sun, Jul 31, 2016 at 1:52 AM, Kamran Mir Hazar <mirhazar.kamran@gmail.com

wrote:

Hi,
I want to use the same database. If I change URL, it will effect the old
spip site as well. Right?

You are right.
But you don't have to use the same database, because your goal is to
redirect the old articles to their copy on the new site.

There are thousants of artcles in my SPIP site, Can I use 301 redirection
with a single line?

with .htaccess it's easy :
Redirect 301 /subdirectory/ http://www.domain.com/

when you change the url format, spip just adds another redirection.
It's magic :slight_smile:

Kamran

On Sun, Jul 31, 2016 at 1:07 AM, Gilles Vincent <gilles.vincent@gmail.com>
wrote:

Hi,

of course it's better to change the url format (because you will start
from fresh on the new website). SPIP will manage that for you.

You can create 301 redirections with htaccess rules
(/sub/spip.php?article12 => /spip.php?article12).
And you can also customize the url management so that
/sub_directory/spip.php?article12 redirects to /Article-title.html
(it's better because you only use one 301, instead of 2 with htaccess +
proper url format)

On Sat, Jul 30, 2016 at 10:52 PM, Kamran Mir Hazar <
mirhazar.kamran@gmail.com> wrote:

Hello,

My SPIP site is in a sub-directory. In the root directory, I have now
the old static one designed by simple html. I want to move all old html
files to a sub-directory, and move SPIP site to the root.

If I move, search engines may not index all SPIP pages including
articles that are created since 2007. Of course, I will work with google
webmaster tools. But is there any solution from SPIP end to get indexed
faster? I’ll probably change URLs from spip.php?article12 to
Titre-de-l-article.html -Rubrique-.html or Titre-de-l-article Rubrique.

Thank you

Kamran

_______________________________________________
spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en

Now, I have installed a fresh SPIP in root, duplicated database and copied IMG folder.
The URL that I selected for the new SPIP is HTML objects URLs (article12.html). On the new SPIP, URLs are like this now: www.domain.com/article12.html now.
I can Redirect 301 /subdirectory/ http://www.domain.com/.
But I didn’t get the htaccess rule for articles that are already indexed in google.
I tried the followings, but didn’t work:
Redirect 301 /sub/spip.php?article12 /article12.html
Redirect 301 /sub/spip.php?article12 /spip.php?article12
When I google indexed articles, it returns http://www.domain.comspip.php/?article223216 without / between. I get Server not found.

On Sun, Jul 31, 2016 at 10:59 PM, Kamran Mir Hazar <
mirhazar.kamran@gmail.com> wrote:

Now, I have installed a fresh SPIP in root, duplicated database and copied
IMG folder.
The URL that I selected for the new SPIP is HTML objects URLs
(article12.html). On the new SPIP, URLs are like this now:
www.domain.com/article12.html now.

Great

I can Redirect 301 /subdirectory/ http://www.domain.com/.
But I didn’t get the htaccess rule for articles that are already indexed
in google.

The custom rule must be placed inside the .htaccess file that SPIP provides

I tried the followings, but didn’t work:
Redirect 301 /sub/spip.php?article12 /article12.html
Redirect 301 /sub/spip.php?article12 /spip.php?article12

It's useless : SPIP already does it

When I google indexed articles, it returns
http://www.domain.comspip.php/?article223216 without / between. I get
Server not found.

On Sun, Jul 31, 2016 at 10:04 AM, Gilles Vincent <gilles.vincent@gmail.com
> wrote:

On Sun, Jul 31, 2016 at 1:52 AM, Kamran Mir Hazar <
mirhazar.kamran@gmail.com> wrote:

Hi,
I want to use the same database. If I change URL, it will effect the old
spip site as well. Right?

You are right.
But you don't have to use the same database, because your goal is to
redirect the old articles to their copy on the new site.

There are thousants of artcles in my SPIP site, Can I use 301
redirection with a single line?

with .htaccess it's easy :
Redirect 301 /subdirectory/ http://www.domain.com/

when you change the url format, spip just adds another redirection.
It's magic :slight_smile:

Kamran

On Sun, Jul 31, 2016 at 1:07 AM, Gilles Vincent <
gilles.vincent@gmail.com> wrote:

Hi,

of course it's better to change the url format (because you will start
from fresh on the new website). SPIP will manage that for you.

You can create 301 redirections with htaccess rules
(/sub/spip.php?article12 => /spip.php?article12).
And you can also customize the url management so that
/sub_directory/spip.php?article12 redirects to /Article-title.html
(it's better because you only use one 301, instead of 2 with htaccess +
proper url format)

On Sat, Jul 30, 2016 at 10:52 PM, Kamran Mir Hazar <
mirhazar.kamran@gmail.com> wrote:

Hello,

My SPIP site is in a sub-directory. In the root directory, I have now
the old static one designed by simple html. I want to move all old html
files to a sub-directory, and move SPIP site to the root.

If I move, search engines may not index all SPIP pages including
articles that are created since 2007. Of course, I will work with google
webmaster tools. But is there any solution from SPIP end to get indexed
faster? I’ll probably change URLs from spip.php?article12 to
Titre-de-l-article.html -Rubrique-.html or Titre-de-l-article Rubrique.

Thank you

Kamran

_______________________________________________
spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en

Does it mean that I only need Redirect 301 /subdirectory/ http://www.domain.com/ inside SPIP .htaccess , and SPIP will take care of the rest?

yes

Why it’s like this:

When I google indexed articles, it returns http://www.domain.comspip.php/?article223216 without / between. I get Server not found.

I don’t know, it works for me.

Are you sure you haven’t forgotten the last ‹ / › in the redirection ?

Correct. I needed to ad / at the end of the address.
Thank you