4571 Posts in 1383 Topics by 1376 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 414 Views |
-
silverstripe clean URL on mamp

28 December 2011 at 11:22pm
Hi All,
I am having trouble running silverstripe on Mac OS using MAMP pro, I have been trying 3 hours to solve but impossible, every time I browse the site it ways appear with index.php/something in url, i thought it was from mod_rewrite but I could find where to fix it even in httpd.conf as well. The site and .httaccess working fine in XAMPP window environment. I really appreciated if you could point me where to fix it.
Regards,
Bunheng -
Re: silverstripe clean URL on mamp

29 December 2011 at 8:39am Last edited: 29 December 2011 8:40am
The only Silverstripe related thing I can think of would be to ensure that the following is in your mysite/_config.php.
SiteTree::enable_nested_urls();
Beyond that, it's really an Apache/MAMP issue so you may have some luck in the MAMP forum if you can't solve it now.
I'd temporarily eliminate Silverstripe from the equation and confirm that mod_rewrite is enabled and functioning correctly.
I'm not sure exactly how MAMP Pro does it, but the Apache configuration for MAMP is in /Applications/MAMP/conf/apache. The main configuration file is httpd.conf. Remember to restart the web server to load in any config changes.You need to confirm that there is a line like this in httpd.conf.
LoadModule rewrite_module modules/mod_rewrite.so
You could also run the following in the terminal
/Applications/MAMP/Library/bin/httpd -M | grep rewrite
This should returnSyntax OK
rewrite_module (shared)From memory MAMP Pro has a slightly funky way of setting up virtual hosts. Perhaps you could create a new virtual host without silverstripe and check the most basic mod_rewrite test you can create.
Another tool in your toolbox would be to log mod_rewrites activity by adding the following to httpd.conf (and restarting server)
RewriteLog /Applications/MAMP/logs/rewrite_log
RewriteLogLevel 1 #(Could be higher but this should be enough for now)Look through your apache logs in /Applications/MAMP/logs and see if there are any clues there.
Good luck.
| 414 Views | ||
|
Page:
1
|
Go to Top |

