This problem came up with the CMS system I have built as all the pages have a url/name. For example, the default homepage would show as www.example.com/homepage.
Typing www.example.com would redirect to this and change the displayed url. The desired behaviour is to redirect
www.example.com -> www.example.com/homepage but only display www.example.com.
On the other hand, if you were to type www.example.com/homepage the display should stay as www.example.com/homepage .
The answer means a slight change to the default CakePHP .htaccess file
The answer means a slight change to the default CakePHP .htaccess file
RewriteRule ^$ app/webroot/ [L]
becomes
RewriteRule ^$ homepage [L]
Of course, homepage could be any page name that you want to be the anchor page.
No comments:
Post a Comment