Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Allowing one xml file in htaccess
#1
I'm trying to set up an e-brochure to website, e-brochure is made with 3d Book Page Flash Flip (www.3d-book.com).
The site using Get Simple is in directory called 'gs31', inside that is directory 'ebrochure' where I have uploaded the files and directories containing the e-brochure.
Inside 'ebrochure' is directory 'xml' which contains one xml file.

E-brochure works if I remove htaccess completely.
Question is: How do I add this xml file the ebrochure is using to my htaccess so that the ebrochure works?

This is my htaccess now (regular GS htaccess plus rewrite to subdir):

Code:
AddDefaultCharset UTF-8
Options -Indexes

# blocks direct access to the XML files - they hold all the data!
<Files ~ "\.xml$">
    Order allow,deny
    Deny from all
    Satisfy All
</Files>
<Files sitemap.xml>
        Order allow,deny
    Allow from all
    Satisfy All
</Files>

RewriteEngine on

# Usually it RewriteBase is just '/', but
# replace it with your subdirectory path
RewriteBase /gs31/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]


# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

# Or, compress certain file types by extension:
<files *.html>
SetOutputFilter DEFLATE
</files>

I've tried to add this

Code:
<Files ebrochure/xml/Content.xml>
        Order allow,deny
    Allow from all
    Satisfy All
</Files>

and this

Code:
<Files "ebrochure/xml/Content.xml">
        Order allow,deny
    Allow from all
    Satisfy All
</Files>

None of them help.
Should there be a htaccess file in 'ebrochure' which allows any xml file within that directory?
And how to write that?
Reply
#2
I put this htaccess into 'ebrochure' directory and everything seems to work now.

Code:
AddDefaultCharset UTF-8
Options -Indexes

# allows direct access to the XML files - remember, they hold all the data!
<Files ~ "\.xml$">
    Order allow,deny
    Allow from all
    Satisfy All
</Files>


# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

# Or, compress certain file types by extension:
<files *.html>
SetOutputFilter DEFLATE
</files>

If I've done something terribly wrong (security issues etc) please don't hesitate to point it out as I really don't know much about htaccess and other server related stuff...
Reply




Users browsing this thread: 1 Guest(s)