Jump to content

Mod rewrite except certain directories.


Recommended Posts

Hello everyone.

 

Basically I have this htaccess rule:

 

RewriteEngine On
RewriteRule ^([^/]+)?/?$ index.php?do=$1 [L,QSA]

 

But when i go to any of the following it runs the rule

-mydomain.com/adirectory

-mydomain.com/adirectory/

 

But this loads like it should:

-mydomain.com/adirectory/index.php

 

Can i give exceptions to the rule for certain domains so for example

-mydomain.com/adirectory

goes to the subdirectory rather than following the htaccess rule?

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/161195-mod-rewrite-except-certain-directories/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.