Page 1 of 1

rewrite mypage.ch/cms/index.php to mypage/index.php ?

Posted: Sun 31. Jul 2005, 19:07
by elsbett
Hy at all

I know, there is a lot written in this forum about rewriting, but i did not found so far the answer to my question:

phpwcms is installed in a subdir, and i dont want to show the subdir path in the url. Is this possible?

I want: http://www.mypage.ch/index.php instead of http://www.mypage.ch/cms/index.php.

Regards

Eru...

Posted: Sun 31. Jul 2005, 21:05
by Pappnase
hello


move the subdir content to the root! thats the simplest way :-)

Posted: Sun 31. Jul 2005, 21:43
by elsbett
Thanks Pappnase

Hmmm, easiest way? Are there other ways? I am hosting multiple domains on my webspace, i really dont like to move all the folders and files to the root.

Regards

Eru...

P.S. Thanks for all your docu work you have done for phpwcms!

Posted: Sun 31. Jul 2005, 22:13
by pico
Hi

point the Domain to the Subfolder.

Posted: Mon 1. Aug 2005, 03:49
by Pappnase
elsbett wrote:Thanks Pappnase

Hmmm, easiest way? Are there other ways? I am hosting multiple domains on my webspace, i really dont like to move all the folders and files to the root.

Regards

Eru...

P.S. Thanks for all your docu work you have done for phpwcms!
hello

but where is the problem to place all into the root!?

Posted: Mon 1. Aug 2005, 08:30
by elsbett
Well, it is more a cosmetic question. I have other things (fotoalbums ect) on the same webspace, and wanted to have the phpwmcs stuff in a subdir, so that i have separated all this stuff from the other.
I saw then, that many discussions about rewrite and subdirs are in this forum, i thought, there is a easy way within phpwcms to handle this.
I thought with rewrite i am completely free to define the path shown in the url, but it seems not to be like this.

But i see now the two ways to move it to the root or to point the domain to the subdir. Thanks for the answers.

Regards

Eru...

Posted: Mon 1. Aug 2005, 22:07
by Marko

Code: Select all

# www.somedomain.com -> sub dir
RewriteCond %{HTTP_HOST} www.somedomain.com$
RewriteCond %{REQUEST_URI} !sub folder/
RewriteRule ^(.*)$ subfolder/$1
Adding this to your .htaccess-file should do the trick, but be aware that your server load grows extensively with it. Also if you have several different sub folders you shoud assign separate sub domain for each one.