Problem z .htaccess

0

Witam, mam duży problem z przekierowaniami/dostępem do plików przy pomocy .htaccess
Mam serwer ze swoją stroną 'mojadomena.pl' w jednym z jego folderów (mojadomena.pl/projekt) wrzuciłem aplikację (zend framework + jakiś custom cms) i mam problem z jej uruchomieniem.
Mam swój plik htaccess w katalogu głownym oraz aplikacja ma swój z wpisanymi przekierowaniami. Pod adresem mojadomena.pl/projekt wyświetla mi się strona główna aplikacji, nie działają natomiast żadne z podstron owej aplikacji - pojawia się ekran informacyjny 'strona w budowie'.

plik htaccess strony głównej:

 #Options FollowSymLinks
#RewriteEngine On
#Options +FollowSymLinks
#RewriteEngine off
#RewriteCond %{HTTP_HOST} ^www.mojadomena.pl$ [NC]
#RewriteRule ^(.*)$ http://mojadomena.pl/$1 [R=301,L]



<IfModule mod_expires.c>
#ExpiresActive On
#ExpiresByType image/jpg "access plus 7 days"
#ExpiresByType image/jpg "access plus 7 days"
#ExpiresByType image/jpeg "access plus 7 days"
#ExpiresByType image/gif "access plus 7 days"
#ExpiresByType image/png "access plus 7 days"
#ExpiresByType text/css "access plus 7 days"
#ExpiresByType application/pdf "access plus 7 days"
#ExpiresByType text/x-javascript "access plus 7 days"
#ExpiresByType application/x-shockwave-flash "access plus 7 days"
#ExpiresByType image/x-icon "access plus 7 days"
#ExpiresDefault "access plus 7 days"
</IfModule>


<ifModule mod_gzip.c>
	mod_gzip_on Yes
	mod_gzip_dechunk Yes
	mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
	mod_gzip_item_include handler ^cgi-script$
	mod_gzip_item_include mime ^text/.*
	mod_gzip_item_include mime ^application/x-javascript.*
	mod_gzip_item_exclude mime ^image/.*
	mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>

plik htaccess aplikacji:

 php_flag magic_quotes_gpc Off
php_flag register_globals Off
php_flag safe_mode off

#SetEnv APPLICATION_ENV development

ServerSignature Off
Options +FollowSymLinks
#DirectoryIndex index.php

# ----------------------------------------------------------------------
# UTF-8 encoding
# ----------------------------------------------------------------------

# Use UTF-8 encoding for anything served text/plain or text/html
AddDefaultCharset utf-8

# Force UTF-8 for a number of file formats
AddCharset utf-8 .html .css .js .xml .json .rss

# ----------------------------------------------------------------------
# Prevent 404 errors for non-existing redirected folders
# ----------------------------------------------------------------------
Options -MultiViews 

# "-Indexes" will have Apache block users from browsing folders without a default document
# Usually you should leave this activated, because you shouldn't allow everybody to surf through
# every folder on your server (which includes rather private places like CMS system folders).
Options -Indexes

<Files .htaccess>
	Order Allow,Deny
	Deny from all
</Files>

# Force the latest IE version, in various cases when it may fall back to IE7 mode
#  github.com/rails/rails/commit/123eb25#commitcomment-118920
# Use ChromeFrame if it's installed for a better experience for the poor IE folk

<IfModule mod_setenvif.c>
  <IfModule mod_headers.c>
    BrowserMatch MSIE ie
    Header set X-UA-Compatible "IE=Edge,chrome=1" env=ie
  </IfModule>
</IfModule>



# ----------------------------------------------------------------------
# Expires headers (for better cache control)
# ----------------------------------------------------------------------


# ----------------------------------------------------------------------
# Gzip compression
# ----------------------------------------------------------------------
<IfModule mod_deflate.c>

# Force deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
<IfModule mod_setenvif.c>
  <IfModule mod_headers.c>
    SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s,?\s(gzip|deflate)?|X{4,13}|~{4,13}|-{4,13})$ HAVE_Accept-Encoding
    RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
  </IfModule>
</IfModule>

# HTML, TXT, CSS, JavaScript, JSON, XML, HTC:
<IfModule filter_module>
  FilterDeclare   COMPRESS
  FilterProvider  COMPRESS  DEFLATE resp=Content-Type /text/(html|css|javascript|plain|x(ml|-component))/
  FilterProvider  COMPRESS  DEFLATE resp=Content-Type /application/(javascript|json|xml|x-javascript)/
  FilterChain     COMPRESS
  FilterProtocol  COMPRESS  change=yes;byteranges=no
</IfModule>

<IfModule !mod_filter.c>
  # Legacy versions of Apache
  AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
  AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript 
  AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
</IfModule>

# Webfonts and SVG:
  <FilesMatch "\.(ttf|otf|eot|svg)$" >
    SetOutputFilter DEFLATE
  </FilesMatch>
</IfModule>

# ----------------------------------------------------------------------
# ETag removal
# ----------------------------------------------------------------------
<IfModule mod_headers.c>
	Header unset ETag
</IfModule>

# ----------------------------------------------------------------------
# Rewrite Engine
# ----------------------------------------------------------------------
<IfModule mod_rewrite.c>
	RewriteEngine on

RewriteCond %{HTTP_HOST} ^www.innadomena.com$ [OR]
RewriteCond %{HTTP_HOST} ^innadomena.com$
RewriteRule ^(.*)$ http://innadomena.comhttp://innadomena.com.pl [R=301,L]

RewriteCond %{HTTP_HOST} ^innadomena.eu$ [OR]
RewriteCond %{HTTP_HOST} ^www.innadomena.eu$ [OR]
RewriteCond %{HTTP_HOST} ^www.innadomena.pl$ [OR]
RewriteCond %{HTTP_HOST} ^innadomena.pl$
RewriteRule ^(.*)$ http://innadomena.com.pl/$1 [R=301,L]

	#RewriteBase /

	Options All -Indexes

	#RewriteCond %{HTTP_HOST} !^www.xsmall.pl$ [NC]
	#RewriteRule ^(.*)$ http://www.xsmall.pl/$1 [L,R=301]
	
	#tłumaczenia symultaniczne
	RewriteCond %{REQUEST_URI} ^/content,5,tlumaczenia_ustne_symultaniczne$ [NC]
	RewriteRule ^(.*)$ /pl/76/Tlumaczenia-symultaniczne- [L,R=301]
	
	#tłumaczenia pisemne
	RewriteCond %{REQUEST_URI} ^/content,4,tlumaczenia_pisemne$ [NC]
	RewriteRule ^(.*)$ /pl/57/Tlumaczenia-prawnicze [L,R=301]
	
	#usługi	
	RewriteCond %{REQUEST_URI} ^/cat,2,Uslugi$ [NC]
	RewriteRule ^(.*)$ / [L,R=301]
	
	#kontakt innadomena.com/pl
	RewriteCond %{REQUEST_URI} ^/contact$ [NC]
	RewriteRule ^(.*)$ /pl/45/Kontakt [L,R=301]
	
	#przekierowania ze stare strony
	RewriteRule ^(admin)(/.*)?$ - [L]
	RewriteCond %{HTTP_HOST} !^blog\.innadomena\.pl
	
	
	RewriteCond %{REQUEST_URI} !^/www.*$ [NC]
	RewriteCond %{REQUEST_URI} !^/admin.*$ [NC]
	RewriteRule !\.(xml|html|htm|pdf|php|js|ico|txt|gif|jpg|png|css|rss|zip|doc|tar\.gz)$ index.php 		
</IfModule>

jest jeszcze plik htacces w jednymz folderów aplikacji, czyli projekt/serwer/htaccess

 php_flag magic_quotes_gpc Off
php_flag register_globals Off
php_flag safe_mode off

#SetEnv APPLICATION_ENV development

ServerSignature Off
Options +FollowSymLinks
DirectoryIndex index.php

# ----------------------------------------------------------------------
# UTF-8 encoding
# ----------------------------------------------------------------------

# Use UTF-8 encoding for anything served text/plain or text/html
AddDefaultCharset utf-8

# Force UTF-8 for a number of file formats
AddCharset utf-8 .html .css .js .xml .json .rss

# ----------------------------------------------------------------------
# Prevent 404 errors for non-existing redirected folders
# ----------------------------------------------------------------------
Options -MultiViews 

# "-Indexes" will have Apache block users from browsing folders without a default document
# Usually you should leave this activated, because you shouldn't allow everybody to surf through
# every folder on your server (which includes rather private places like CMS system folders).
Options -Indexes

<Files .htaccess>
	Order Allow,Deny
	Deny from all
</Files>

# Force the latest IE version, in various cases when it may fall back to IE7 mode
#  github.com/rails/rails/commit/123eb25#commitcomment-118920
# Use ChromeFrame if it's installed for a better experience for the poor IE folk

<IfModule mod_setenvif.c>
  <IfModule mod_headers.c>
    BrowserMatch MSIE ie
    Header set X-UA-Compatible "IE=Edge,chrome=1" env=ie
  </IfModule>
</IfModule>



# ----------------------------------------------------------------------
# Expires headers (for better cache control)
# ----------------------------------------------------------------------


# ----------------------------------------------------------------------
# Gzip compression
# ----------------------------------------------------------------------
<IfModule mod_deflate.c>

# Force deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
<IfModule mod_setenvif.c>
  <IfModule mod_headers.c>
    SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s,?\s(gzip|deflate)?|X{4,13}|~{4,13}|-{4,13})$ HAVE_Accept-Encoding
    RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
  </IfModule>
</IfModule>

# HTML, TXT, CSS, JavaScript, JSON, XML, HTC:
<IfModule filter_module>
  FilterDeclare   COMPRESS
  FilterProvider  COMPRESS  DEFLATE resp=Content-Type /text/(html|css|javascript|plain|x(ml|-component))/
  FilterProvider  COMPRESS  DEFLATE resp=Content-Type /application/(javascript|json|xml|x-javascript)/
  FilterChain     COMPRESS
  FilterProtocol  COMPRESS  change=yes;byteranges=no
</IfModule>

<IfModule !mod_filter.c>
  # Legacy versions of Apache
  AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
  AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript 
  AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
</IfModule>

# Webfonts and SVG:
  <FilesMatch "\.(ttf|otf|eot|svg)$" >
    SetOutputFilter DEFLATE
  </FilesMatch>
</IfModule>

# ----------------------------------------------------------------------
# ETag removal
# ----------------------------------------------------------------------
<IfModule mod_headers.c>
	Header unset ETag
</IfModule>
 
0

a może problem jest do linków bezpośrednich poszczególnych podstron, masz prawidłowo wpisane?

0

Musiałem przerzucić aplikację na serwer z którego pochodziła, tam działa i niestety tak zostanie. Temat do zamknięcia.

1 użytkowników online, w tym zalogowanych: 0, gości: 1