Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
HotlinkBlocker
 Helicon Tech : HotlinkBlocker
Subject Topic: how to use ISAPI_Rewrite IIS5 with Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Cherine
Newbie
Newbie


Joined: 27 July 2010
Online Status: Offline
Posts: 21
Posted: 27 July 2010 at 9:46am | IP Logged Quote Cherine

HI,
sorry for my english.

I have a folder template1.
and in the folder there has a file . htaccess which contains all this:


RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php?p=$1 [QSA,L].



I also have a file (index.php) which contains all this:


<?php
define("WEBROOT","/template1/");
define("WEBROOT2","/template1/content/templatemo_233_coffee/");
define("WEBROOT3","/template1/content/phpBB3/");
if(!isset($_GET["p"])){$_GET["p"]="index";}
if(!file_exists("content/".$_GET["p"].".php")){ $_GET["p"]="404";}
ob_start();
include "content/".$_GET["p"].".php";
$content=ob_get_contents();
ob_end_clean();
include "template.php";
?>

I also have a file (template.php) which contains  this:



 <li>
<a href=<?php echo WEBROOT;?>article/article1">Contact</a>
</li>


emplate folder is structured like this one:

Template1->
       index.php ,template.php ,content->article->article1.php
                      
                              

I put everything in the folder (wwwroot).
and I installed (ISAPI_Rewrite3_0075_Lite).




my problem is that when I run the link
http://localhost/template1/article/article1
 I get the error 404.
therefore isapi_rewrte did not work.
is what I forgot something.
all suggestions are welcome.



THANKSSSSSSSSSS
Back to Top View Cherine's Profile Search for other posts by Cherine
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10489
Posted: 28 July 2010 at 3:18am | IP Logged Quote Anton

The issue is that LITE version of ISAPI_Rewrite does not support distributed .htaccess files, only FULL version does.

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
Cherine
Newbie
Newbie


Joined: 27 July 2010
Online Status: Offline
Posts: 21
Posted: 28 July 2010 at 6:52am | IP Logged Quote Cherine

ah  ok
thank you for responding.
when I work under wamp I just need to uncomment this line (rewrite_module LoadModule modules / mod_rewrite.so)
now I'm forced to work with IIS5.

is it possible to tell me what I should do in this case

Thank you
Back to Top View Cherine's Profile Search for other posts by Cherine
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10489
Posted: 28 July 2010 at 8:19am | IP Logged Quote Anton

"is it possible to tell me what I should do in this case"
- Could you please clarify what exact case you mean? Please tell what do you need to achieve under IIS5 and what version of ISAPI_Rewrite you use.

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
Cherine
Newbie
Newbie


Joined: 27 July 2010
Online Status: Offline
Posts: 21
Posted: 28 July 2010 at 8:29am | IP Logged Quote Cherine

I install both version 2 and 3.
but I do not know exactly what to install for IIS5 .??????


what I mean is that I have a (. htaccess).
allows me to write shorter URL.

I want to know how it's done with IIS5.

how it is with IIS5.

I imagine there are other ways to write the URL with IIS5

THX
Back to Top View Cherine's Profile Search for other posts by Cherine
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10489
Posted: 29 July 2010 at 3:06am | IP Logged Quote Anton

Both v2 and v3 will work fine on IIS5.
If you already have a .htaccess file (which was probably used on Apache before, right?), you'd better install v3 and use the config as is
(without any modifications):

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?p=$1 [QSA,L]

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
Cherine
Newbie
Newbie


Joined: 27 July 2010
Online Status: Offline
Posts: 21
Posted: 30 July 2010 at 7:44am | IP Logged Quote Cherine

HI,

yes I worked with apache and now I work with CGI \ FastCGI with IIS 5.
I installed the V3.
Now I still get the error 404.

an idea of the problem?

THANK YOU
Back to Top View Cherine's Profile Search for other posts by Cherine
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10489
Posted: 02 August 2010 at 3:08am | IP Logged Quote Anton

Please enable logging in httpd.conf as follows:

RewriteLogLevel 9
LogLevel debug

Than make the testing request and provide corresponding logs records.

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
Cherine
Newbie
Newbie


Joined: 27 July 2010
Online Status: Offline
Posts: 21
Posted: 05 August 2010 at 9:00am | IP Logged Quote Cherine

hello
I am truly sorry for the delay.
I activated as you have asked me.
I must to do anything else??????????????????????????????
THANKS
Back to Top View Cherine's Profile Search for other posts by Cherine
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10489
Posted: 06 August 2010 at 2:44am | IP Logged Quote Anton

"I must to do anything else?"
- having logging enabled, make the target request which doesn't work and provide me with rewrite and error logs records for it.

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
Cherine
Newbie
Newbie


Joined: 27 July 2010
Online Status: Offline
Posts: 21
Posted: 06 August 2010 at 10:05am | IP Logged Quote Cherine

hi,
thank you for responding
I get this:

Document sans titrePHP Warning: include(content/404.php) [function.include]: failed to open stream: No such file or directory in C:\Inetpub\wwwroot\test\index.php on line 6 PHP Warning: include() [function.include]: Failed opening 'content/404.php' for inclusion (include_path='.;C:\php-5.2.13-Win32\extras\SSRSReport\bin') in C:\Inetpub\wwwroot\test\index.php on line 6
Back to Top View Cherine's Profile Search for other posts by Cherine
 
Cherine
Newbie
Newbie


Joined: 27 July 2010
Online Status: Offline
Posts: 21
Posted: 06 August 2010 at 10:13am | IP Logged Quote Cherine

I'll rewrite what I wrote to one of the members of this forum.
may be it will help you help me

HI this is a simple example:


1.create a test folder in wamp
2.Create 
a template.php file and put it in the  test folder
     and just put this line
(<a href="<?php echo WEBROOT; ?>article/article1.php">hi</a>)in the body tag.
3.create another file in the test folder (index.php) and put this :


<?php
define("WEBROOT","/test/");
if(!isset($_GET["p"])){$_GET["p"]="index";}
if(!file_exists("content/".$_GET["p"].".php")){ $_GET["p"]="404";}
ob_start();
include "content/".$_GET["p"].".php";
$content=ob_get_contents();
ob_end_clean();
include "template.php";
?>


4.create one folder in the folder test (content).

5.create in the folder content article1.
6.in the folder artilce1 create a file article.php and put juste this:


 <?php
 echo "hi";
       
?>


7.in the folder test create one file .htaccess and put this:


RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php?p=$1 [QSA,L]


uncomment this line:
LoadModule rewrite_module modules/mod_rewrite.so
in httpd.conf of wamp
and you start wamp localhost.

and note well the link.

everything happening in wamp course
Now you must tell me how to do under IIS5

if you did not understand anything you said to me

THANKS




Back to Top View Cherine's Profile Search for other posts by Cherine
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10489
Posted: 09 August 2010 at 2:03am | IP Logged Quote Anton

Sorry, but I still can't understand what has wamp to do with ISAPI_Rewrite?
The error log records are not from ISAPI_Rewrite error.log.
Could you please explain what kind of help you want to get from us?

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
Cherine
Newbie
Newbie


Joined: 27 July 2010
Online Status: Offline
Posts: 21
Posted: 09 August 2010 at 8:17am | IP Logged Quote Cherine

hi,
agree,
I work with WampServer.
but now I'm forced to work with IIS5.
So to move the work  WampServer to IIS5.
I'm must doing the  good change.

I ask you to put yourself in my place you have a project in wamp server.
and now you must work under IIS5.
What you made of your files
so that (. htaccess) work well.

thanks
Back to Top View Cherine's Profile Search for other posts by Cherine
 
Cherine
Newbie
Newbie


Joined: 27 July 2010
Online Status: Offline
Posts: 21
Posted: 09 August 2010 at 8:21am | IP Logged Quote Cherine

must know that WampServer is free and easy to download
Back to Top View Cherine's Profile Search for other posts by Cherine
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10489
Posted: 09 August 2010 at 8:46am | IP Logged Quote Anton

Ok, so you need your wamp config to work on IIS5.
What you need is ISAPI_Rewrite 3 Full - to make use of .htaccess file(s) you have in wamp.
The .htaccess contents will remain just the same.
Have you tried it this way?
If yes, what was the result and which one you expected?

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
Cherine
Newbie
Newbie


Joined: 27 July 2010
Online Status: Offline
Posts: 21
Posted: 09 August 2010 at 8:52am | IP Logged Quote Cherine

I move my project folder directly (WWW) wamp. to file
(Inetpub) from IIS5 when I run the project and I click on a menu
 I get an error 404.
it can not find the path to the folder.
I use the isapi_rewrite3.
I vote in IIS5 it is installed.
Back to Top View Cherine's Profile Search for other posts by Cherine
 
Cherine
Newbie
Newbie


Joined: 27 July 2010
Online Status: Offline
Posts: 21
Posted: 09 August 2010 at 8:55am | IP Logged Quote Cherine

I can see the isapi_rewrite in IIS5
Back to Top View Cherine's Profile Search for other posts by Cherine
 
Cherine
Newbie
Newbie


Joined: 27 July 2010
Online Status: Offline
Posts: 21
Posted: 09 August 2010 at 9:05am | IP Logged Quote Cherine

I do not know if you have my email.
I can let you back in my machine to see where the problem is.
I install teamviewer.
Back to Top View Cherine's Profile Search for other posts by Cherine
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10489
Posted: 09 August 2010 at 9:09am | IP Logged Quote Anton

Ok, please send the meeting credentials to support@helicontech.com with reference to this forum thread.
But I'll look at it only tomorrow as I'm leaving the office now.
Looking forward to your email.

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 

Page of 2 Next >>
  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum