Jump to content

Archived

This topic is now archived and is closed to further replies.

yonta

Friendly url trouble

Recommended Posts

Hi

I want to turn this url
www.example.com/blog/index.php?action=Projects or www.example.com/blog/index.php?action=Project&id=1
into
www.example.com/blog/index/Projects or
www.example.com/blog/index/Project/1.

So far reading some tutorials i've got this (based on the tutorial at phpfreaks on mod_rewrite)

RewriteEngine On
RewriteRule ^index/(.*).php /index.php?action=$1
RewriteRule ^index/(.*)/(.*).php /index.php?action=$1&id=$2

but it isn't working. I also tried this, thinking maybe it was because the site's inside the blog folder

RewriteEngine On
RewriteRule blog/^index/(.*).php /index.php?action=$1
RewriteRule blog/^index/(.*)/(.*).php /index.php?action=$1&id=$2

but it didn't work either. I put the .htaccess file inside the blog folder.

Can anybody help? Please?

Thanx :)

Sofia

Share this post


Link to post
Share on other sites
Help please... some pointers...

Sofia

[!--quoteo(post=367443:date=Apr 22 2006, 08:40 AM:name=yonta)--][div class=\'quotetop\']QUOTE(yonta @ Apr 22 2006, 08:40 AM) [snapback]367443[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Hi

I want to turn this url
www.example.com/blog/index.php?action=Projects or www.example.com/blog/index.php?action=Project&id=1
into
www.example.com/blog/index/Projects or
www.example.com/blog/index/Project/1.

So far reading some tutorials i've got this (based on the tutorial at phpfreaks on mod_rewrite)

RewriteEngine On
RewriteRule ^index/(.*).php /index.php?action=$1
RewriteRule ^index/(.*)/(.*).php /index.php?action=$1&id=$2

but it isn't working. I also tried this, thinking maybe it was because the site's inside the blog folder

RewriteEngine On
RewriteRule blog/^index/(.*).php /index.php?action=$1
RewriteRule blog/^index/(.*)/(.*).php /index.php?action=$1&id=$2

but it didn't work either. I put the .htaccess file inside the blog folder.

Can anybody help? Please?

Thanx :)

Sofia
[/quote]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.