Can I not have the .phtml?

Discuss phpwcms here, please do not post support requests, bug reports, or feature requests! Non-phpwcms questions, discussion goes in General Chat!
Post Reply
deanloh
Posts: 99
Joined: Sat 12. Feb 2005, 05:31
Location: Singapore
Contact:

Can I not have the .phtml?

Post by deanloh »

I wish I'm better with mod_rewrite. I have made attempt after attempt, I'm trying to make the system to generate URLs without .phtml at the back.

Like, instead of "domain.com/0.1.0.0.0.1.phtml", I would like to have just "domain.com/0.1.0.0.0.1"

The only file I found that contains the text "phtml" is "front.func.inc.php", so I find and replace the lines

Code: Select all

$file = str_replace(',', '.', $noid).'.phtml'; 
to

Code: Select all

$file = str_replace(',', '.', $noid); 
Then I know I should not forget to edit .htaccess too, so I went and change this line:

Code: Select all

RewriteRule ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.phtml$ index.php?id=$1.$2.$3.$4.$5.$6
to

Code: Select all

RewriteRule ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)$ index.php?id=$1.$2.$3.$4.$5.$6
and this line:

Code: Select all

RewriteRule ^(.+)\.phtml$ index.php?$1
to

Code: Select all

RewriteRule ^(.+)$ index.php?$1
Thinking it should work by now? NO! The page went looping forever. So what do you think I have missed? Or is this not possible?

Thoughts? Suggestions?
Pappnase

Post by Pappnase »

hello

hello

i would say uplaod the latest htaccess from an phpwcms zip file. remove the _ and fine is it ;-)
deanloh
Posts: 99
Joined: Sat 12. Feb 2005, 05:31
Location: Singapore
Contact:

Post by deanloh »

Pappnase

When you said latest file, did you mean 1.2.1?
Pappnase

Post by Pappnase »

deanloh wrote:Pappnase

When you said latest file, did you mean 1.2.1?
ups sorry

i was read your thread to fast! so i see now that you want have the links without phtml!

and that i do never test or try! so sorry for my quick answer
deanloh
Posts: 99
Joined: Sat 12. Feb 2005, 05:31
Location: Singapore
Contact:

Post by deanloh »

LOL, for a moment I thought there was hope.

Thanks for replying anyway, Pappnase, you are a good man.
deanloh
Posts: 99
Joined: Sat 12. Feb 2005, 05:31
Location: Singapore
Contact:

Post by deanloh »

I'm still hoping for an answer to this, anyone has a clue?
spirelli
Posts: 996
Joined: Tue 27. Jul 2004, 13:37
Location: London

Post by spirelli »

did a little search for you, but I am not sure whether this will help in any way:

http://ionrock.umemusic.com/index.php?id=6,11,0,0,1,0
This is trying something a bit different, but maybe you get the right clues from there, or someone else knows some better source...
brans

Post by brans »

I think the best source to go to will be http://www.modrewrite.de/foren/forums.html , as they are experts in mod_rewrite!

they helped me a couple of times in the past... support is quick and good.
Post Reply