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

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
elsbett
Posts: 13
Joined: Mon 28. Feb 2005, 12:51

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

Post 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...
Pappnase

Post by Pappnase »

hello


move the subdir content to the root! thats the simplest way :-)
elsbett
Posts: 13
Joined: Mon 28. Feb 2005, 12:51

Post 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!
User avatar
pico
Posts: 2595
Joined: Wed 28. Jul 2004, 18:04
Location: Frankfurt/M Germany
Contact:

Post by pico »

Hi

point the Domain to the Subfolder.
Lieber Gott gib mir Geduld - ABER BEEIL DICH
Horst - find me at Musiker-Board
Pappnase

Post 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!?
elsbett
Posts: 13
Joined: Mon 28. Feb 2005, 12:51

Post 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...
Marko
Posts: 65
Joined: Tue 2. Dec 2003, 23:58
Location: Finland

Post 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.
Post Reply