Forums / Install & configuration / Problems with rewrite rule
Massimo Sanna
Friday 27 May 2005 1:31:01 pm
Hi there, in my hosting platform, the virtual host is configured like this: domain.com accepts some aliases like /awstats /eaccelerator, to manage the services. www.domain.com redirects to the document root of ezpublish. Inside the ezpublish directory they placed a .htaccess which provides the rewrite functions, but in this way I see /index.php/ in the url. I know I could modify my site.ini.append.php to make it work with index.php, but I'd prefer not to see that in the url. If I put the rewrite rule in httpd.conf it works fine but the extra statistics services and cache management pages are being redirected to ezpublish which answers with a module not found as usual.What can I do? Is the rewrite rule exception the only way to solve this?
The best solution for me would be to keep the rewrite in my .htaccess file, and leave httpd.conf without it, since HSP platform is known to overwrite config files when the admins install some system upgrades...
kracker (the)
Friday 27 May 2005 2:57:38 pm
I'm sure your hosting provider's support would tell you that you can include exclude commands into your .htaccess file to do exactly what you need. Be sure to add the these RewriteCond before your primary RewriteRule for these to work in your .htaccess
RewriteEngine On RewriteCond %{REQUEST_URI} !^/favicon.ico* RewriteCond %{REQUEST_URI} !^/awstats* RewriteCond %{REQUEST_URI} !^/eaccelerator* RewriteRule !\.(gif|ico|jpe?g|png|css|js)|var(.+)storage.pdf(.+)\.pdf$ index.php
Optionally you may want / need one of these (depends):
DirectoryIndex index.php
//kracker<i>eminem : stimulate</i>
Member since: 2001.07.13 || http://ezpedia.se7enx.com/