Htaccess to hide part of url ?

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
kube
Forum Members
Forum Members
Posts: 29
Joined: Sun Jan 03, 2010 10:34 am
Location: Belgium

Htaccess to hide part of url ?

Post 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]
Last edited by Dr.CSS on Fri Apr 27, 2012 7:15 pm, edited 1 time in total.
Reason: Please use double quotes on fake links so they aren't clickable...
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Htaccess to hide part of url ?

Post by calguy1000 »

This is not a CMSMS related question.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
kube
Forum Members
Forum Members
Posts: 29
Joined: Sun Jan 03, 2010 10:34 am
Location: Belgium

Re: Htaccess to hide part of url ?

Post 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) :'(
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Htaccess to hide part of url ?

Post by Rolf »

- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
kube
Forum Members
Forum Members
Posts: 29
Joined: Sun Jan 03, 2010 10:34 am
Location: Belgium

Re: Htaccess to hide part of url ?

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

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