Hi all,
first of all, haven't had a look for phpwcms since leaving the country (directly after 1.3.3 was published). Just checked 1.4.X DEV - some beautiful little changes. Great guys! Thanks to all people somehow involved.
My Question - couldn't find anything searching the board:
I want to move an old plain-html-project (500+ pages) to phpwcms. My probably largest problem is not loosing all the hundreds of external links pointing to my pages AND not loosing all the existing google-links. As you probably can imagine, i don't want to have the page killed by loosing all links. On the other hand administrating 500+ pages is a pain.
So far the old webpage is kind of structured in the following way
(UPPERCASE -> directory, lowercase -> file):
ROOT
+--- index.htm
+--- TOWNS
...+--- overview.htm
...+--- BERLIN
......+--- index.htm
...+--- MUNICH
......+--- index.htm
+--- SIGHTS
...+--- overview.htm
...
My main-objective is to get phpwcms involved and somehow still keep the links to the old pages alive. Do you have any suggestions/experiences regarding that topic? Would be absolutely great as otherwise using my favourite cms wouldn't make sense.
Thanks in advance.
[SOLVED] Rewrite - Simulating Directory Structure
[SOLVED] Rewrite - Simulating Directory Structure
Last edited by kolja on Tue 20. Jan 2009, 11:20, edited 2 times in total.
Re: Rewrite - Simulating Directory Structure
You could (easily
) do something like the following in your .htaccess:
RedirectMatch 301 ^/TOWNS/overview.htm(.*)$ /index.php?aid=497
RedirectMatch 301 ^/BERLIN/(.*)$ /index.php?aid=47
RedirectMatch 301 ^/BERLIN/(.*)$ /index.php?aid=47
or just plain to the root index.php
RedirectMatch 301 ^/BERLIN/(.*)$ /
Check it out!
It will become a long list, but the permanently redirected addresses will be indexed soon... (hopefully)
For me it did the work...

RedirectMatch 301 ^/TOWNS/overview.htm(.*)$ /index.php?aid=497
RedirectMatch 301 ^/BERLIN/(.*)$ /index.php?aid=47
RedirectMatch 301 ^/BERLIN/(.*)$ /index.php?aid=47
or just plain to the root index.php
RedirectMatch 301 ^/BERLIN/(.*)$ /
Check it out!
It will become a long list, but the permanently redirected addresses will be indexed soon... (hopefully)

For me it did the work...
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
Re: Rewrite - Simulating Directory Structure
Sounds like a first very good idea. It tells you that the page has permanently moved AND directly redirects you? Would be a bloody good solution. And claus,claus wrote: Check it out!
It will become a long list, but the permanently redirected addresses will be indexed soon... (hopefully)![]()

Do you only have to place ONE htaccess into root-directory or into each directory of the full old structure?
But one more question regarding the htaccess - perhaps you know: The htaccess delivered with phpwcms never properly worked for me (rewriting index.php?test -> test.phtml). My ISP told me that mod_rewrite is activated and working properly. Any ideas/links to forumpage?
Re: Rewrite - Simulating Directory Structure
@claus: Any example how the URL will look?
I'm still waiting for issue 132 http://code.google.com/p/phpwcms/issues/detail?id=132
I'm still waiting for issue 132 http://code.google.com/p/phpwcms/issues/detail?id=132
Re: Rewrite - Simulating Directory Structure
Jensensen wrote:@claus: Any example how the URL will look?
-> http://www.domain.tld/index.php?aid=497claus wrote: RedirectMatch 301 ^/TOWNS/overview.htm(.*)$ /index.php?aid=497
-> http://www.domain.tld/index.phpclaus wrote: RedirectMatch 301 ^/BERLIN/(.*)$ /
Re: Rewrite - Simulating Directory Structure
No no, you have a standard .htaccess in your phpwcms- root. There you'll write down your list. As far as I'm understanding your concern you are going to switch over the content of your "old" site into the cms, right? If done, the same domain will be routed to the newly set up cms and bang!
(But do some testing before with two or three test articles on a test domain - perhaps we'll have to tweak some more
)
@Jens
Perhaps this is even rewriting the address into some nicely formatted hamburg.phtml with one stroke? Who knows 
(But do some testing before with two or three test articles on a test domain - perhaps we'll have to tweak some more

@Jens


It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
Re: Rewrite - Simulating Directory Structure
Definitely new names will contain main-keywords! Haven't had position one for a long time without a reasonclaus wrote:Perhaps this is even rewriting the address into some nicely formatted hamburg.phtml with one stroke? Who knows

I'll have a completely new directory-structure with a filled and tested phpwcms and a fully functional htaccess. Once everything works and is double-checked, i'll switch the domain to the new directory and - with your words: Bang.

Thanks, claus.