View Single Post
Old 05-17-2009, 02:48 AM   PM User | #1
samcroft
New to the CF scene

 
Join Date: May 2009
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
samcroft is an unknown quantity at this point
Trying to rewrite some URLs, confused.

Code:
Options +FollowSymLinks 
RewriteEngine On 
RewriteRule ^(.*?)/(.*?)/(.*?)/(.*?)/(.*)$ index.php?page=$1-$2-$3-$4-$5 
RewriteRule ^(.*?)/(.*?)/(.*?)/(.*)$ index.php?page=$1-$2-$3-$4 
RewriteRule ^(.*?)/(.*?)/(.*)$ index.php?page=$1-$2-$3 
RewriteRule ^(.*?)/(.*)$ index.php?page=$1-$2 
RewriteRule ^(.*)$ index.php?page=$1
I'm trying to get some URLs to convert like follows

http://www.domain.com/index.php?page=word1-word2-word3 to convert to http://www.domain.com/word1/word2/word3/

With those current rules it just goes to what index.php outputs, rather than index.php?page=word1-word2-word3 . The same goes if I go up to word5, or down to word2.

Although,

http://www.domain.com/index.php?page=word1 WORKS, it will convert to http://www.domain.com/word1/ - it just won't do anything further on.

Does anyone know what I need to do to make this work?

Thanks for any help you can provide, my knowledge of this is very limited.
samcroft is offline   Reply With Quote