Forum Moderators: phranque
We have user profiles on our site. The URLs are http://www.example.com/profiles/username-here
We've been using the Apache/mod_rewrite configuration below, and it works, but is it the best way to do what we're trying to achieve? Especially for a high-traffic site? Another problem is that we get a ton of "File not found" errors in our Apache error_log, even though the URL works correctly.
<VirtualHost 1.2.3.4>
DocumentRoot /directory/to/our/site/here
ServerName www.example.com
ServerAlias www.example.com
<Location / >
RewriteEngine on
RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d
</Location>
<Location /profiles/ >
RewriteEngine on
RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d
RewriteRule!\.(js¦ico¦gif¦jpg¦png¦css)$ /profiles/index.php
</Location>
ErrorDocument 404 /404.html
</VirtualHost>
Any suggestions would be appreciated. Thanks!
[edited by: jdMorgan at 3:24 pm (utc) on May 17, 2007]
[edit reason] Example.com [/edit]
..., but here's what we're trying to do:..., but is it the best way to do what we're trying to achieve?
you haven't actually described what you are trying to do.
also an examplified url that fails and the corresponding error log message would help.
and can we assume this is in the server config file vs. the per-directory files?