Re: Redirect, Rewrite and php.ini

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

 



Hello,
Thank you for your answer...

Vincent Bray escribió:
On 02/07/07, Senén de Diego <senen@xxxxxxxxxxxxx> wrote:
I'm trying to redirect requests from "/foo/bar.jnlp" to "/foo/bar.php".

Be careful using the word redirect as it has a very specific meaning.

I've tried this .htaccess file:

[
Redirect permanent /foo/bar.jnlp http://www.domain.com/foo/bar.php
]

This is a redirect :-)

I've also tried this one:

[
RewriteEngine On
RewriteBase /foo
RewriteRule ^bar\.jnlp$ bar.php
]

This isn't. It's an internal rewrite which, if it works, the client
will be unaware of.

I would prefer the client being unaware of the change. I'm only trying the "Redirect" directive to check wether our hosting provider has, at least, the mod_alias enabled...
Your use of RewriteBase indicates that the htaccess file is in the
/foo directory, is that right? In order to better test whether you are
able to use mod_rewrite, please read (it's a draft so your comments
would be helpful):

That's right, /foo would be the directory (obviously, it is only an example...)
http://wiki.apache.org/httpd/Rewrite/Troubleshooting/HtaccessIgnored
The Wooga thing produces an "Internal Server Error", if I request an existing resource. If I request a non existing resource (such as the /foo/bar.jnlp I'm trying to redirect) I get the "Page not found" error I also get without the Wooga.
So, it seems that the .httaccess file is being read.

Both files work in our local server, but not in our hosting provider's one. I've asked them if they have mod_alias and rewrite enabled, and their last answer has been:

"As previously stated, the module AllowOverride is enabled at this time
on our shared hosting plans and is accessible through php.ini.
Mod_rewrite is also functioning correctly on your hosting plan. Our
Advanced Hosting Support team has reviewed your issue and found no
errors with the configuration of our hosting servers. We are unable to
assist you with your custom scripting issues at this time..."

As I don't know what has php.ini to do with this issue, I would like to
know, from someone with more knowledge than I have, if this answer makes
sense and if there is anything I could enable through php.ini to make this work.

No, it doesn't make much sense. AllowOverride is a directive, not a
module, and has absolutely nothing to do with php.ini.

That's what I thought. I think this people does have neither mod_alias nor mod_rewrite enabled, and I don't know why, they are telling me just the contrary...

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[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