I am developing an intranet on an fresh Ubuntu server which will be accessible from http://play (no .com or any tld at all). I have mod_rewrite enabled according to phpinfo and in /etc/apache2/sites-available/default I have AllowOverride All under the <directory /> tag for DocumentRoot /var/www .
I have followed the instructions at
http://rtfm.modx.com/display/revolution20/Using+Friendly+URLs and my .htaccess looks like:
# MODX supports Friendly URLs via this .htaccess file. You must serve web
# pages via Apache with mod_rewrite to use this functionality, and you must
# change the file name from ht.access to .htaccess.
#
# Make sure RewriteBase points to the directory where you installed MODX.
# E.g., "/modx" if your installation is in a "modx" subdirectory.
#
# You may choose to make your URLs non-case-sensitive by adding a NC directive
# to your rule: RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC]
RewriteEngine On
RewriteBase /
# Rewrite www.domain.com -> domain.com -- used with SEO Strict URLs plugin
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^play/ [NC]
RewriteRule (.*) http://play/$1 [R=301,L]
#RewriteCond %{HTTP_HOST} .
#RewriteCond %{HTTP_HOST} !^example-domain-please-change\.com [NC]
#RewriteRule (.*) http://example-domain-please-change.com/$1 [R=301,L]
#
# or for the opposite domain.com -> www.domain.com use the following
# DO NOT USE BOTH
#
#RewriteCond %{HTTP_HOST} .
#RewriteCond %{HTTP_HOST} !^www\.example-domain-please-change\.com [NC]
#RewriteRule (.*) http://www.example-domain-please-change.com/$1 [R=301,L]
# Rewrite secure requests properly to prevent SSL cert warnings, e.g. prevent
# https://www.domain.com when your cert only allows https://secure.domain.com
#RewriteCond %{SERVER_PORT} !^443
#RewriteRule (.*) https://example-domain-please-change.com/$1 [R=301,L]
# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
however all I get when I visit http://play/products is:
Not Found
The requested URL /products/ was not found on this server.
Apache/2.2.22 (Ubuntu) Server at play Port 80
Any ideas at all? I am thinking that apache may not be set up correctly...
[ed. note: ficklelife last edited this post 13 years, 5 months ago.]