how to make a file accessible via http://[URL]/file

Author Message

Rafal Zrobecki

Tuesday 19 December 2006 4:01:42 am

hi there,

this is my .htaccess:

php_value allow_call_time_pass_reference 0

<FilesMatch ".">
order allow,deny
deny from all
</FilesMatch>

<FilesMatch "(index\.php|\.(gif|jpe?g|png|css|js|html|xml)|var(.+)storage.pdf(.+)\.pdf)$">
order allow,deny
allow from all
</FilesMatch>

# If you see "Forbidden" when trying to access root page of your site
# without 'index.php' appended, uncomment the following "Files" section.
# NOTE: replace "ezpublish-3.6.0" with base name of the directory
# where your eZ publish intallation resides.
# e.g. base name of "/sites/ezpublish/ezpublish-3.6.0" is "ezpublish-3.6.0".

<Files "ezpublish-3.8.6">
   order allow,deny
   allow from all
</Files>

RewriteEngine On
RewriteRule !sitemap\.xml|\.(gif|jpe?g|png|css|js|htm|html|swf)|var(.+)storage.pdf(.+)\.pdf$ index.php
DirectoryIndex index.php

I'd like to make a sitemap.xml visible via http://[url]/sitemap.xml.

http://www.zrobecki.com

Claudia Kosny

Wednesday 20 December 2006 12:16:45 pm

Hello Rafal

Your htaccess works fine on my server. What is the problem? What happens when you try to access the sitemap.xml file?

Claudia

Rafal Zrobecki

Wednesday 20 December 2006 3:54:38 pm

hi Claudia

this is what i get:

Module not found

The requested module sitemap.xml could not be found.

Possible reasons for this are:

    * The module name was misspelled, try changing the URL.
    * The module does not exist on this site.
    * This site uses siteaccess matching in the URL and you didn't supply one, try inserting a siteaccess name before the module in the URL .

apart from the changes in .htaccess I asked my admin to make changes for my account

<VirtualHost x>
   <Directory x>
       Options FollowSymLinks
       AllowOverride None
   </Directory>

   <IfModule mod_php4.c>
       php_admin_flag safe_mode Off
       php_admin_value register_globals    0
       php_value magic_quotes_gpc  0
       php_value magic_quotes_runtime  0
       php_value allow_call_time_pass_reference 0
   </IfModule>

   DirectoryIndex index.php

   <IfModule mod_rewrite.c>
       RewriteEngine On
       Rewriterule ^/var/storage/.* - [L]
       Rewriterule ^/var/[^/]+/storage/.* - [L]
       RewriteRule ^/var/cache/texttoimage/.* - [L]
       RewriteRule ^/var/[^/]+/cache/texttoimage/.* - [L]
       Rewriterule ^/design/[^/]+/(stylesheets|images|javascript)/.* - [L]
       Rewriterule ^/share/icons/.* - [L]
       Rewriterule
^/extension/[^/]+/design/[^/]+/(stylesheets|images|javascripts?)/.* -
[L]
       Rewriterule
^/packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [L]
       RewriteRule ^/packages/styles/.+/thumbnail/.* - [L]
       RewriteRule ^/favicon\.ico - [L]
       RewriteRule ^/robots\.txt - [L]
       # Uncomment the following lines when using popup style debug.
       # RewriteRule ^/var/cache/debug\.html.* - [L]
       # RewriteRule ^/var/[^/]+/cache/debug\.html.* - [L]
       RewriteRule .* /index.php
   </IfModule>

   DocumentRoot x
   ServerName x   
   ServerAlias x
</VirtualHost>

http://www.zrobecki.com

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.