Re: AW: Rewrite, .php files and PHP-FPM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"If we go to index2.php, we get "index2.php" which indicates the mod_rewrite is not working on php request."

Not only it IS working, it is working as intended.

If you don't add the R flag you are doing an "internal" redirection.

http://httpd.apache.org/docs/current/rewrite/flags.html#flag_r

By the way, why don't you use Redirect/RedirectMatch for such simple redirects? specially since you want external redirections.

2015-07-22 18:10 GMT+02:00 Adolph, Tobias <Tobias.Adolph@xxxxxx>:

Do you use php via mod_proxy_fcgi?


Could be possible that the .htaccess file is never honoured since the request was proxied before.


Kind regards,

Tobias Adolph


Von: Rose, John B <jbrose@xxxxxxx>
Gesendet: Mittwoch, 22. Juli 2015 17:05
An: users@xxxxxxxxxxxxxxxx
Betreff: Rewrite, .php files and PHP-FPM
 
Red Hat 7
Apache 2.4
PHP-FPM

We are having some trouble getting Rewrite to work with Apache 2.4/PHP-FPM

In other words, it isn't successfully working. 


Our test example:

The .htaccess file:


<IfModule mod_rewrite.c>

    RewriteEngine On

    RewriteRule ^index2.html$ index.html

    RewriteRule ^index2.php$ index.php

</IfModule>


Here is the content of index.php(In other words that is the text in the file, in addition to being the name):

"index.php"


Here is the content of index2.php:

"index2.php"


If we go to index2.php, we get "index2.php" which indicates the mod_rewrite is not working on php request.



Any suggestions on addressing the above problem?

Thanks



--
Daniel Ferradal
IT Specialist

email         dferradal at gmail.com

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux