RewriteBase räddar (CakePHP)-dagen

Har du någonsin kört CakePHP? Har du velat lägga din CakePHP-mapp i en underkatalog till din www-root? Eller kanske rentav någon annanstans? Då är RewriteBase i .htaccess något du vill lägga på minnet.

Jag gick från 404-fel till fullt fungerande CakePHP installationer genom att i .htaccess lägga till

<code>RewriteBase /[sökväg till din CakePHP-root]</code>

Om du råkar ut för 404 i dina installationer, kolla upp så att du har RewriteBase inlagt först, gå sen på att försöka mecka runt med annat. (Såklart måste ju din Apache-installation överhuvudtaget fungera. Och mod_rewrite.. Samt PHP… MySQL är vettigt…. Glöm inte…..)


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

If you’d like to utilise the power of Webmentions do the following:
1: Create a post or something as a response to this one and make sure that the response contains this posts permalink URL (protip: copy and paste it from your browser)
3: Copy and paste the URL from your response in the field below and click Ping Me! 3: Wait for the moderation gnomes to do their work.
4: Done!