howto rewrite www.domain.com to www.domain.com/some-mod-rewriten-page

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
pistols
New Member
New Member
Posts: 8
Joined: Tue Jun 17, 2008 8:26 am

howto rewrite www.domain.com to www.domain.com/some-mod-rewriten-page

Post by pistols »

Hello there

i have a small problem mod_rewrite. I need to make the following work:

When some user enters the www.domain.com into the browsers url bar the domain is rewriten to
www.domain.com/some-mod-rewriten-page

i am currently using cmsms 1.1.2 on an apache 1.3.34

I guess it has to do something with redirect in .htaccess but i dont know how
furtherly i am using the default mod_rewrite set created by cmsms:

Options +FollowSymLinks
RewriteEngine on
RewriteBase /

# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]

# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]



I would like to use some clean solution embbed in the .htaccess file but unfortunatelly my mod_rewrite knowledge is limited... any suggestions would be very helpful
Pierre M.

Re: howto rewrite www.domain.com to www.domain.com/some-mod-rewriten-page

Post by Pierre M. »

Hello,
pistols wrote: i am currently using cmsms 1.1.2
This is an old, bugy, insecure, unsupported version. We know that. Today you should use 1.3+

Pierre M.
JeremyBASS

Re: howto rewrite www.domain.com to www.domain.com/some-mod-rewriten-page

Post by JeremyBASS »

After updating you'd want to read these posts, they go over this topic, ( only 2 post down from this)

This also does not use the RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
Which can/could be an issue...

read this first
http://forum.cmsmadesimple.org/index.php/topic,22890.0.html

This is the originating issue
http://forum.cmsmadesimple.org/index.php/topic,22564.30.html

Searching the forum first is always the best thing to do… Have a great day
jeremyBass
pistols
New Member
New Member
Posts: 8
Joined: Tue Jun 17, 2008 8:26 am

Re: howto rewrite www.domain.com to www.domain.com/some-mod-rewriten-page

Post by pistols »

ok thank's for the links, i will update to 1.1.3 as soon as possible
Nick
Post Reply

Return to “The Lounge”