rewrite from subfolder to root url [almost solved]

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
SimonSchaufi

rewrite from subfolder to root url [almost solved]

Post by SimonSchaufi »

hello !
I have cmsms installed in a folder which is called cmsmadesimple. now i want the visitor to type the url: http://example.com/ but with a htaccess file the user should access http://example.com/cmsmadesimple. This new url should not be visible, he shall just see the base url.

i have read this: http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html

but i have no idea how to solve that.

if my explanation was to complicated:

should type: http://localhost/
should access: http://localhost/cmsmadesimple
should not be redirected but see only: http://localhost/
Last edited by SimonSchaufi on Thu Apr 03, 2008 7:36 am, edited 1 time in total.
SimonSchaufi

Re: rewrite from subfolder to root url [almost solved]

Post by SimonSchaufi »

Code: Select all

RewriteEngine On
RewriteCond %{REQUEST_URI} !/cmsmadesimple/
RewriteRule (.*) /cmsmadesimple/$1 [L]
but now when i try: http://www.example.com/test it accesses the folder /cmsmadesimple/test but i want it to access http://www.example.com/test

simon
Last edited by SimonSchaufi on Thu Apr 03, 2008 7:51 am, edited 1 time in total.
Wiedmann
Forum Members
Forum Members
Posts: 233
Joined: Wed Mar 26, 2008 1:49 am

Re: rewrite from subfolder to root url [almost solved]

Post by Wiedmann »

Just a question:
Is it not easie,r to simply copy your cms into the document root?
SimonSchaufi

Re: rewrite from subfolder to root url [almost solved]

Post by SimonSchaufi »

I have 2 different cms installed and i dont want both in the root, thats why i need it.
Pierre M.

Re: rewrite from subfolder to root url [almost solved]

Post by Pierre M. »

And how should the other site in the root be accessed ?
How should the webserver know to which CMSms install it should forward internaly a request ?

Pierre M.
SimonSchaufi

Re: rewrite from subfolder to root url [almost solved]

Post by SimonSchaufi »

i want CMS Mades Simple to be accessed like http://localhost/cmsmadesimple/ and Joomla with the root URL
Pierre M.

Re: rewrite from subfolder to root url [almost solved]

Post by Pierre M. »

SimonSchaufi wrote: i want CMS Mades Simple to be accessed like http://localhost/cmsmadesimple/ and Joomla with the root URL
I don't know Joomla but I think if you install it in the root it will be accessible like http://localhost/
If you make your CMSms install dir be /cmsmadesimple then it will be accessible like http://localhost/cmsmadesimple/

Just make sure some mod_rewrite Joomla doesn't take /cmsmadesimple prefixed URLs.

Pierre M.
SimonSchaufi

Re: rewrite from subfolder to root url [almost solved]

Post by SimonSchaufi »

Yes, i know that already. I just thought that it is possible but if there is nobody here in this forum that can help me, no problem.
Pierre M.

Re: rewrite from subfolder to root url [almost solved]

Post by Pierre M. »

SimonSchaufi wrote: Yes, i know that already.
If I say what you already know I think I haven't undersood what your question is.

Pierre M.
SimonSchaufi

Re: rewrite from subfolder to root url [almost solved]

Post by SimonSchaufi »

ok, i think it it better to move the homepage to the root and forget about all mod_rewrites :)

as i searched in google i think it is not possible to access a subfolder but display in the addressbar the root url.

usually u use mod_rewrite to do the following:

http://localhost/index.php?page=alias&param=value -> http://localhost/alias/param/ or something like that.

so my idea was to do exactly the same like if i call

http://localhost/index.php?page=alias&param=value
i will access
http://localhost/cmsmadesimple/index.php?page=alias&param=value
in the background but still see
http://localhost/index.php?page=alias&param=value
in my addressbar
Locked

Return to “[locked] Installation, Setup and Upgrade”