rewrite from subfolder to root url [almost solved]
rewrite from subfolder to root url [almost solved]
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/
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.
Re: rewrite from subfolder to root url [almost solved]
Code: Select all
RewriteEngine On
RewriteCond %{REQUEST_URI} !/cmsmadesimple/
RewriteRule (.*) /cmsmadesimple/$1 [L]
simon
Last edited by SimonSchaufi on Thu Apr 03, 2008 7:51 am, edited 1 time in total.
Re: rewrite from subfolder to root url [almost solved]
Just a question:
Is it not easie,r to simply copy your cms into the document root?
Is it not easie,r to simply copy your cms into the document root?
Re: rewrite from subfolder to root url [almost solved]
I have 2 different cms installed and i dont want both in the root, thats why i need it.
Re: rewrite from subfolder to root url [almost solved]
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.
How should the webserver know to which CMSms install it should forward internaly a request ?
Pierre M.
Re: rewrite from subfolder to root url [almost solved]
i want CMS Mades Simple to be accessed like http://localhost/cmsmadesimple/ and Joomla with the root URL
Re: rewrite from subfolder to root url [almost solved]
I don't know Joomla but I think if you install it in the root it will be accessible like http://localhost/SimonSchaufi wrote: i want CMS Mades Simple to be accessed like http://localhost/cmsmadesimple/ and Joomla with the root URL
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.
Re: rewrite from subfolder to root url [almost solved]
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.
Re: rewrite from subfolder to root url [almost solved]
If I say what you already know I think I haven't undersood what your question is.SimonSchaufi wrote: Yes, i know that already.
Pierre M.
Re: rewrite from subfolder to root url [almost solved]
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¶m=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¶m=value
i will access
http://localhost/cmsmadesimple/index.php?page=alias¶m=value
in the background but still see
http://localhost/index.php?page=alias¶m=value
in my addressbar

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¶m=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¶m=value
i will access
http://localhost/cmsmadesimple/index.php?page=alias¶m=value
in the background but still see
http://localhost/index.php?page=alias¶m=value
in my addressbar