SEO friendly URLs (.htaccess)

Posted by user317005 on Stack Overflow See other posts from Stack Overflow or by user317005
Published on 2010-12-21T21:40:13Z Indexed on 2010/12/21 21:54 UTC
Read the original article Hit count: 206

Filed under:
|
|
|
http://www.domain.com/folder/file?x=1&y=2

Change to:

http://www.domain.com/folder/file/1/2/

http://www.domain.com/folder/?x=1

Change to:

http://www.domain.com/folder/1/

I tried:

Options +FollowSymLinks
RewriteEngine On
RewriteRule ^folder/(.*)/$ folder/index.php?x=$1 [L]
RewriteRule ^folder/file/(.*)/(.*)/$ folder/file.php?x=$1&y=$2 [L]

but that doesn't work, does anyone have any idea why?

when i take out the first rule, i can access the second one via:

http://www.domain.com/folder/1/2/

but not:

http://www.domain.com/folder/file/1/2/

god, i hope i am not confusing anyone who is reading this lol i hope it makes sense

© Stack Overflow or respective owner

Related posts about url

Related posts about .htaccess