Forum Moderators: phranque
there are running 2 different php file as DirectoryIndex in same folder. but the problem is that there is a .htaccess file too in same folder. by the way, i'm using that .htaccess file for writing my rewrite rules.
----------------------------------------------------------
Apache Conf:
localhost , port:4321 , index.php
localhost , port:4322 , other.php
----------------------------------------------------------
Options +FollowSymLinks +ExecCGI
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} \..+$
RewriteCond %{REQUEST_URI}!\.html$
RewriteRule .* - [L]
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
----------------------------------------------------------
It's seem like perfect but it's not. My other DirectoryIndex never run because of that rewriterule. How can i use current DirectoryIndex value, not hardcoded index.php in the rule above?
Thank you for your time.
Umut
<IfModule mod_rewrite.c>
RewriteEngine on
#
RewriteCond $1 !\.. [OR]
RewriteCond $1 \.html$
RewriteRule (.*) / [L]
</IfModule>
and we're also rewriting to "/" instead of rewriting to a specific file. Other changes were made to get rid of unnecessary regex tokens; The code should be entirely equivalent to what you had, but one-half the size.
Jim