Back to top

Autore Topic: Problema con rewriterule e immagini  (Letto 884 volte)

Offline violettina

  • Nuovo arrivato
  • *
  • Post: 7
    • Mostra profilo
Problema con rewriterule e immagini
« il: 30 Dic 2011, 13:13:32 »
Ciao a tutti, ho un problema con la riscrittura dei file htaccess sul mio sito. L'installazione di joomla è in una cartella che la riscrittura porta alla root principale. Funziona tutto perfettamente ma non riesco a visualizzare le immagini degli articoli. Dove sbaglio?


HTACCESS IN ROOT:



#Options +FollowSymLinks
RewriteEngine On
# Redirect to the Joomla root folder
RewriteCond %{HTTP_HOST} ^(www\.)?sfogliamilano\.it$ [NC]
RewriteRule ^(index\.html)?$ http://www.sfogliamilano.it/news/ [R=301]


# Only apply to URLs on this domain
RewriteCond %{HTTP_HOST} ^(www\.)?sfogliamilano\.it$


# Only apply to URLs that aren't already under folder
RewriteCond %{REQUEST_URI} !^/news/


# Don't apply to URLs that go to existing files or folders
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d


# Rewrite all those to insert /j
RewriteRule ^(.*)$ /news/$1 [L]


#RewriteCond %{REQUEST_URI} !^/news/images/
RewriteCond %{REQUEST_URI} !^/news/images/[^/]+$
# exclude the following file types in the root folder
RewriteCond %{REQUEST_URI} !^/[^/]+\.(gif¦jpg¦png)$


---------------------------------------------------------


HTACCESS IN JOOMLA





#Options +FollowSymLinks
RewriteEngine On
RewriteBase /


# Block out any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F]
#
## End - Rewrite rules to block out some common exploits.


# Exclude any subdirectories in the site root that should NOT be re-directed to joomla
# At least include the joomla directory here. The other commented lines are examples and will need customising
# It is probably best not to use directories in your site root that also exist in joomla e.g. images
RewriteCond %{REQUEST_URI} !^/images/




## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the request is for something within the component folder,
# or for the site root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.


-----------------------------------------------


Nei 2 htaccess ci sono anche 2 tentativi di riscrivere la cartella images in news/images ma non funziona..


spero in un vostro aiuto.
grazie

 



Web Design Bolzano Kreatif