By hakeem on
After installing Drupal 5.1 in the root of public_html, I tried to install Invision File Manager (in /ifm) and other file manager scripts in the root also. It seems that Drupal "catches" the request www.mysite.com/ifm and says: "Page Not Found".
Why? Anyone has a solution?
Comments
Many solutions
There are many solutions, depending on what you want to do. This is caused by Drupal's htaccess file.
The relevant lines are (a) the last block of lines which are responsible for "clean URLs", (b) the DirectoryIndex line and (c) sometimes the Options -Indexes line, depending on the problem. Problems can be solved either by modifying Drupal's .htaccess file or by adding a new .htaccess file in the subdirectory to override some settings.
But to be more specific I need to know what IFM is. Is it a PHP application? Does it have an index.php file or what?
Yes, it is a PHP web file
Yes, it is a PHP web file manager (Invision Filemanager) and has index.php.
--
www.hakeem-sy.com
--
www.hakeem-sy.com
Check the .htaccess file
Edited to add: The following is only relevant if you have Drupal installed directly in your web root and not in a directory. If Drupal is in a directory, it is just not possible to affect another parallel directory. If they are parallel directories, Drupal has nothing to do with it and you just need an .htaccess file in /ifm containing a
DirectoryIndex index.phpline.If Drupal is directly installed in your web root, the following applies.
----------------
Check the .htaccess file which is in your public_html. If Drupal itself works, then the DirectoryIndex line is OK and the culprit is probably that last block of lines:
Do you have these lines? The two RewriteCond lines tell Drupal not to interfere if it is a real file or a real directory. There is a caveat though. If it is a real directory but does not contain an index file as specified in the DirecoryIndex line, then this directive is ignored and Drupal does interfere.
You can make it bulletproof by disabling those two lines with a # and putting this in their place:
RewriteCond %{REQUEST_FILENAME} !-UThis should work, except if there is some other modification in your public_html/.htaccess file.
This works for me...
I just poted this and it didn't seem to show? Here it is again, my apologies if it's a dupe.
Back up your .htaccess file for safety, and add this line:
RewriteRule ^DIRECTORY$ http://www.example.com/DIRECTORY/INDEX_FILE [R=301,L]
Replace DIRECTORY with ifm, and INDEX_FILE with the file you're requesting to launch this application (index.php, or perhaps index.htm, etc...).
this will rewrite requests for www.example.com/ifm as www.example.com/ifm/index.php
good luck.
Here's what works on my site...
Add a line in your .htaccess file (make a backup copy first!)
RewriteRule ^DIRECTORY$ http://www.mysite.com/DIRECTORY/INDEX_FILE [R=301,L]
so yours would be:
RewriteRule ^ifm$ http://www.mysite.com/ifm/INDEX_FILE [R=301,L]
And replace INDEX_FILE with index.php, or index.htm, or what ever file needs to open when www.mysite.com/ifm is requested.
I had tried other .htacces redirect tricks with some success and some disaster, but this one has been flawless.
Another approach
Another approach would be to install Drupal in a sub-directory, so that Drupal's .htaccess file has no effect when navigating to the ifm directory.
HTH
Terry
Recent Drupal sites:-
http://www.route324.com, http://www.univarpcp.co.uk, http://www.imagineanimation.net, http://62.73.185.61, http://www.shamusntash.com
Recent Drupal sites:-
www.allegiantair.com www.defaqto.com www.quarkexpeditions.com www.sportrelief.com www.chevronhackles.com
www.philipturnercrafts.co.uk www.intelflexplus.com www.aprilroseturner.com www.businessclubagent.ihg.com www.businessclub.ihg
Another approach
Another approach would be to install drupal in a sub-directory, so that its .htaccess file has no effect when navigating to the ifm directory.
HTH
Terry
Recent Drupal sites:-
http://www.route324.com, http://www.univarpcp.co.uk, http://www.imagineanimation.net, http://62.73.185.61, http://www.shamusntash.com
Recent Drupal sites:-
www.allegiantair.com www.defaqto.com www.quarkexpeditions.com www.sportrelief.com www.chevronhackles.com
www.philipturnercrafts.co.uk www.intelflexplus.com www.aprilroseturner.com www.businessclubagent.ihg.com www.businessclub.ihg