Welcome Guest, Not a member yet? Register   Sign In
.htaccess exclude directory
#1

[eluser]LuckyFella73[/eluser]
I made a website for a client and use a htaccess file for cleaner urls.
My problem is: the hosting company provides a link to the phpmyadmin
panel, like

domain.com/_pma_/

Now when calling that url I get a "page not found error" ...

My .htaccess currently looks like this:
Code:
Options -Indexes

AddType application/x-httpd-php3 .php3
AddType application/x-httpd-php43 .php .php4
AddType application/x-httpd-php5 .php5

<IfModule mod_rewrite.c>

DirectoryIndex index.php
RewriteEngine on
RewriteBase /

RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php?/$1 [L,QSA]

</IfModule>

Info:
- The directory "_pma" is not visible when connected to the server via ftp.
- I tried to add the directory to the htaccess like this (didn't help):

Code:
RewriteCond $1 !^(index\.php|[b]_pma_[/b]|images|css|js|robots\.txt|favicon\.ico)

I don't know how to exclude this directory from url rewriting so any help is much
appreciated!
#2

[eluser]InsiteFX[/eluser]
Try this LuckyFella73
Code:
RewriteCond %{REQUEST_URI} !^/(domain.com/_pma_/.*)$

may need to remove the first forward slash not sure.

or
Code:
RewriteCond %{REQUEST_URI} !^/_pma_/
#3

[eluser]LuckyFella73[/eluser]
Thanks for your code example. Unfortunatly it didn't work for me.
I tried both with and without leading slash.

Maybe it's because the directory does not exist like the other directories
I have in htdoc? At least it's not visible via ftp connection (I have
my setting switched to "show hidden files").
#4

[eluser]CroNiX[/eluser]
If it's an actual LINK, like a symbolic link in the filesystem, then you can tell the htaccess to ignore those just like you are for the Directories and Files

Code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
#5

[eluser]ahmed.alsiddig[/eluser]
i have the same problem
#6

[eluser]kostyak[/eluser]
Sorry, I have nothing to tell.




Theme © iAndrew 2016 - Forum software by © MyBB