Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have setup mod_rewrite and mod_alias on Apache2 on Debian (in a test server).

I have the following rewrite code in /etc/apache2/sites-available/default:

<Directory />
  Options FollowSymLinks
  AllowOverride All
  RewriteEngine on
  RewriteCond %{REQUEST_URI} !\.(php|html|css|js|gif|png|jpe?g)$
  RewriteRule (.*)$ /index.php [L]
</Directory>

I have the following alias code that is setup by default from the phpmyadmin package (loaded via apt-get install phpmyadmin and located in /etc/apache2/conf.d/phpmyadmin.conf):

Alias /phpmyadmin /usr/share/phpmyadmin

Everytime I load http://my.test.server/phpmyadmin, it goes to http://my.test.server/index.php and not the alias (which is bypassed/ignored?).

How do I setup an exclusion rule to allow aliases to pass through (even if the alias is setup in a different file?)

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Exclude the URIs containing "/phpmyadmin/" if you don't want them redirected:

RewriteCond   %{REQUEST_URI}  !/phpmyadmin/.*
share|improve this answer
    
Thanks! That worked! –  James Nine Mar 21 '12 at 22:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.