You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Wilmer Arambula <te...@gmail.com> on 2015/03/08 02:26:46 UTC
[users@httpd] Problem .htaccess
Hi, I have the following .htaccess file:
# if a directory or a file exists, use the request directly
# otherwise forward the request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
when the host is equal to localhost RewriteRule . index-test.php
else RewriteRule . index.php
as I do apologize for my ignorance, my version of apache 2.4,
Thks,
--
*Wilmer Arambula. *
Re: [users@httpd] Problem .htaccess
Posted by Wilmer Arambula <te...@gmail.com>.
Thanks for your reply I solved RewriteCond.
Wilmer.
El dom., 8 de marzo de 2015 1:01, jeffmonte101 . <je...@gmail.com>
escribió:
> Wilmer,
>
> You would need to explain what you are trying to achieve here. Do you mean
> you wish to have two set of rewrite rules handling requsts for 1. localhost
> and 2.everything else?
>
> Have you tried using RewriteCond?
>
> On Sun, Mar 8, 2015 at 6:56 AM, Wilmer Arambula <
> tecnologiaterabyte@gmail.com> wrote:
>
>> Hi, I have the following .htaccess file:
>>
>> # if a directory or a file exists, use the request directly
>> # otherwise forward the request to index.php
>> RewriteCond %{REQUEST_FILENAME} !-f
>> RewriteCond %{REQUEST_FILENAME} !-d
>> RewriteRule . index.php
>>
>> when the host is equal to localhost RewriteRule . index-test.php
>>
>> else RewriteRule . index.php
>>
>> as I do apologize for my ignorance, my version of apache 2.4,
>>
>> Thks,
>>
>> --
>> *Wilmer Arambula. *
>>
>>
>
Re: [users@httpd] Problem .htaccess
Posted by "jeffmonte101 ." <je...@gmail.com>.
Wilmer,
You would need to explain what you are trying to achieve here. Do you mean
you wish to have two set of rewrite rules handling requsts for 1. localhost
and 2.everything else?
Have you tried using RewriteCond?
On Sun, Mar 8, 2015 at 6:56 AM, Wilmer Arambula <
tecnologiaterabyte@gmail.com> wrote:
> Hi, I have the following .htaccess file:
>
> # if a directory or a file exists, use the request directly
> # otherwise forward the request to index.php
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule . index.php
>
> when the host is equal to localhost RewriteRule . index-test.php
>
> else RewriteRule . index.php
>
> as I do apologize for my ignorance, my version of apache 2.4,
>
> Thks,
>
> --
> *Wilmer Arambula. *
>
>