howto rewrite www.domain.com to www.domain.com/some-mod-rewriten-page
Posted: Tue Jun 17, 2008 8:44 am
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
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