Page 1 of 1

Htaccess to hide part of url ?

Posted: Fri Apr 27, 2012 8:37 am
by kube
Hello there,

I am hosting several sites in one single cmsms installation using multiple trees.
I have the folowing urls:
"http://www.site1.url/site1/...
"http://www.site2.url/site2/...
"http://www.site2.url/site2/...

i would like to remove the first level of the hierarchy from the url...
Can i do that with url rewriting ?

here is my actual htaccess:

Code: Select all

# for CMS made simple
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteCond %{REQUEST_METHOD} !POST$
RewriteRule ^(.*) %{REQUEST_URI}/ [NE,R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]

Re: Htaccess to hide part of url ?

Posted: Fri Apr 27, 2012 1:53 pm
by calguy1000
This is not a CMSMS related question.

Re: Htaccess to hide part of url ?

Posted: Mon Apr 30, 2012 8:16 am
by kube
let me reformulate the question then:
How do i do that without breaking cmsms ? (i have no technical clue as how cmsms handles url rewriting) :'(

Re: Htaccess to hide part of url ?

Posted: Mon Apr 30, 2012 8:25 am
by Rolf

Re: Htaccess to hide part of url ?

Posted: Mon Apr 30, 2012 9:11 am
by kube
Tx Rolf,

I saw that post the other day but it's for physical folders. In my case, it's a virtual folder created by cmsms 's pages structure...