Forum Moderators: phranque

Message Too Old, No Replies

Tiny Rewrite Help

         

vfetty

6:44 am on Jun 16, 2008 (gmt 0)

10+ Year Member



Hi All! Thanks for taking a look at this issue, more sets of eyes.

I have this in my .htaccess

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/community/viewthread/([0-9]+)/([A-Za-z0-9]*)/(.*)$ index.php/community/viewthread/$1 [L]

basically it's expression engine and the above is just removing the index.php from the url.

Just need to know if the above rule and the URL I am calling should work?

http://www.example.com/community/viewthread/84/BIG-NEWS-STORY/

jdMorgan

3:49 pm on Jun 16, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It won't work in .htaccess unless you remove the leading slash from the RewriteRule pattern.

> basically it's expression engine and the above is just removing the index.php from the url.

No, what this code does is *add* index.php to the URL-path requested by the client (which does not have index.php in it) and use the result to generate the filepath to be used to serve the requested content.

Jim

vfetty

3:41 am on Jun 17, 2008 (gmt 0)

10+ Year Member



Thanks Jim! I will continue to work on the rule and see if I can get it to work right. It's a bit tricky with the EE thing as I never server up the index.php but take it out. Anyways back to the drawing board:)