Jump to content


Photo

Aliasmatch Condicional


  • Faça o login para participar
7 replies to this topic

#1 Danilo Moraes

Danilo Moraes

    Novato no fórum

  • Usuários
  • 12 posts
  • Sexo:Não informado

Posted 13/07/2011, 11:57

Buenas pessoal, estou precisando de uma luz.
Vejam minha configuração de virtual host:
<VirtualHost *:80>

	ServerAdmin clientarcrm@localhost
	ServerName clientar.com.br
	ServerAlias *.clientar.com.br
	DocumentRoot /home/danilo/Projetos/clientarcrm/
	CustomLog /var/log/apache2/clientar-access.log combined	

	<Directory /home/danilo/Projetos/clientarcrm/>		
		Options FollowSymLinks
		AllowOverride none	

		RewriteEngine On
		RewriteRule ^(.*)$ index.php [L]
	</Directory>

	AliasMatch ^/([^/]+)/public(.*) /home/danilo/Projetos/clientarcrm/system/application/standart.packets/$1/public$2

	<DirectoryMatch "^/home/danilo/Projetos/clientarcrm/system/application/standart\.packets/.+/public/*">
		RewriteEngine On
		RewriteCond %{REQUEST_FILENAME} !-f
		RewriteRule ^(.*)$ /home/danilo/Projetos/clientarcrm/index.php [L]

	</DirectoryMatch>
</VirtualHost>

Bom, nele eu fiz redirecionar qualquer requisição para o arquivo index.php a não ser que o arquivo esteja naquele diretório public e realmente exista. Fiz isso para que o próprio apache possa retornar os arquivos css, javascript ou imagem que forem usados no html. Até aqui está tudo funcionando perfeitamente bem. O que estou precisando agora é de algo como um teste condicional.
Eu tenho duas pastas diferentes mas geralmente com o mesmo conteúdo. Uma é: /home/danilo/Projetos/clientarcrm/system/application/standart.packets/ e a outra: /home/danilo/Projetos/clientarcrm/system/application/extension.packets/

O que preciso é saber se existe um diretório dentro de extension.packets. Se existir, ele retorna os arquivos da pasta public dentro dele. Se não existir, ele retorna os arquivos de dentro da pasta public de standart.packets.

Exemplo:
http://clientar.clie.../css/tabela.css

preciso que ele tente retornar o arquivo /home/danilo/Projetos/clientarcrm/system/application/estension.packets/usuario/public/css/tabela.css se esse arquivo não existir, então ele me retorna o arquivo em: /home/danilo/Projetos/clientarcrm/system/application/standart.packets/usuario/public/css/tabela.css

Procura em extension.packets/ e depois em standart.packets/

Alguém poderia me ajudar com isso?
Muito obrigado desde já.

#2 RonsisM

RonsisM

    Super Veterano

  • Usuários
  • 15724 posts
  • Sexo:Masculino
  • Localidade:Plovdiv

Posted 18/09/2017, 18:35

Cialis Ou Pas cialis price buy accutane online from canada
Secure Ordering Progesterone Menopause Internet In Us Prostatitis Keflex
Cialis Efectos Negativos cialis Buy Synthroid Paypal

#3 RonsisM

RonsisM

    Super Veterano

  • Usuários
  • 15724 posts
  • Sexo:Masculino
  • Localidade:Plovdiv

Posted 04/10/2017, 15:04

Donar Sangre Receta Propecia Viagra Krankenkasse Schweiz viagra online prescription Levitra Nebeneffekte

#4 RonsisM

RonsisM

    Super Veterano

  • Usuários
  • 15724 posts
  • Sexo:Masculino
  • Localidade:Plovdiv

Posted 13/10/2017, 15:44

Propecia Prix Canadien Propecia Information viagra Cialis 20 Mg Einnehmen

#5 RonsisM

RonsisM

    Super Veterano

  • Usuários
  • 15724 posts
  • Sexo:Masculino
  • Localidade:Plovdiv

Posted 30/10/2017, 21:33

Generic On Line Progesterone Mail Order Medication buy viagra Order Effexor No Prescription Viagra Costo 2013
Viagra Genericum Kaufen viagra Ear Infection And Antibiotic Cephalexin

#6 RonsisM

RonsisM

    Super Veterano

  • Usuários
  • 15724 posts
  • Sexo:Masculino
  • Localidade:Plovdiv

Posted 17/11/2017, 21:03

Cephalexin Product Cialis A Largo Plazo cialis Amoxicillin Penicillin False Positive Drug Test Cialis 5mg From Canada Kamagra Falschung

#7 LarPhozyHah

LarPhozyHah

    Super Veterano

  • Usuários
  • 14515 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 21/11/2017, 14:00

Levitra 10 Avant Lasix Uk cialis Buy Viagra In Cyprus 282

#8 JeffMalm

JeffMalm

    Super Veterano

  • Usuários
  • 12254 posts
  • Sexo:Feminino
  • Localidade:Mount Carey

Posted 10/02/2023, 18:46

and Wiernik, P ivermectin cream However, such a capacity if it exists is clearly not generalizable to all GFAP cells in the VZ, and in fact may be limited to a minority of the B1 population
eGFP and SSA3 a pluripotency marker expressions were analyzed in the presence left plots or absence right plots of Dox 0 cialis order online
propecia 5mg The patient was heterozygous for the factor V Leiden mutation and the MTHFR polymorphism, but probably the event was precipitated due to the presence of CC 24
Touyz RM, Herrmann SMS, Herrmann J online generic cialis




0 user(s) are reading this topic

0 membro(s), 0 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq