However the problem that then occurs is that URLs tend to get ugly.
E.g. our webspace looks like: http://www.agito.be/CMS/index.php, instead of http://www.agito.be/index.php
.htaccess files are an ideal solution, but often difficult to use. Today I managed to remove the /CMS/ part out of the URL without side-effects. Here is the code:
RewriteEngine on
#
# Internally rewrite requests for all pages in "/" to pages in /CMS/
#
# If not already rewritten to /CMS/
RewriteCond $1 !^CMS/
# Prepend "/CMS" to the requested URL-path
RewriteRule (.*) /CMS/$1 [L]
If CMSMS would remove the index.php to be shown, I would be completely happy :)
Geen opmerkingen:
Een reactie posten