This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
Common Questions (Forum Locked Forum Locked)
 Helicon Tech : Common Questions
Subject Topic: ISAPI_REWRITE Lite and Symfony (Topic Closed Topic Closed)
Author
Message |
souldivide
Newbie


Joined: 16 October 2007
Location: Philippines
Posts: 2
Posted: 16 October 2007 at 10:47am  

Greetings,

I'm using Symfony PHP framework right now with the website I'm working on and I need to get clean URL. Is it possible with Rewrite Lite? My URL always need to include the php file name in the url which makes it look a little messy.

I am hoping to get http://localhost/module/action/parameter instead of http://localhost/filename.php/module/action/parameter.

Any advice would be greatly appreciated.

Thank you.
Back to Top
 
Lexey
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Posts: 8119
Posted: 19 October 2007 at 11:58am  

ISAPI_Rewrite could allow you to access http://localhost/filename.php/module/action/parameter as http://localhost/module/action/parameter. But you will need to modify your application to present new link (http://localhost/module/action/parameter) to a user instead of an old one.
Back to Top
 
souldivide
Newbie


Joined: 16 October 2007
Location: Philippines
Posts: 2
Posted: 19 October 2007 at 12:55pm  

Thanks for the response.

When you say that I need to modify my application, do you mean Symfony? Symfony has a packaged .htaccess that contains the rewriting rules which I know IIS does not recognize. Or is it the httpd.ini found in the installation directory of isapi_rewrite? right now, the code found in my httpd.ini is:


[ISAPI_Rewrite]

# Defend your computer from some worm attacks
RewriteRule .*(?:global.asa|default\.ida|root\.exe|\.\.).* . [F,I,O]


# we skip all files with .something except .html
RewriteCond URL .*\..+$
RewriteCond URL (?!.*\.html$).*
RewriteRule (.*) $1 [L]


# we keep the .php files unchanged
RewriteRule (.*\.php)(.*) $1$2 [L]


# finally we redirect to our front web controller
RewriteRule (.*) /index.php [L]


This is what it contains but sadly, the routing is not working. If i use http://localhost/not_index.php/module/action/parameter it will work but if I use http://localhost/index.php/module/action/parameter it wont. i think it is because index.php is set as the default home page which is why its being ommitted in the url.

I need to know if what I need to do is work on the isapi_rewrite side or on the symfony side to make this going. I hope someone can point me to the correct direction.

thank you.

Back to Top
 
Lexey
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Posts: 8119
Posted: 21 October 2007 at 7:29am  

If Symfony already has predefined .htaccess file then you'd better to try to use it as is with the ISAPI_Rewrite 3. ISAPI_Rewrite 2 has different syntax, so .htaccess rules will not work without modifications.
Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version
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