Overwrite Apache mod-rewrite folder

I have Apache installed with XAMPP package and am working locally.

I have a rule in my .htaccess file that overwrites everything, let's say this for example:

RewriteRule ^(.*)$ index.php?x=$1

      

Note that I don't have a RewriteCond that makes this rule ignore existing file or folders.

Now let's say that I have a folder called "mydir". When I go to http: // localhost / mydir / it does indeed overwrite this and the folder contents are not shown. However, you know how usual when you open a folder in the browser, without the last slash, it is automatically added? Well, that's still the case, with strange behavior. If I go to http: // localhost / mydir , it automatically changes the URL to http: // localhost / mydir /? X = mydir .

Good thing it messed up because it breaks my rule pretty badly. Is this some kind of Apache config parameter or am I missing something?

Thank.

+2


source to share


1 answer


See link DirectorySlash

on



http://httpd.apache.org/docs/2.2/mod/mod_dir.html

      

+2


source







All Articles