tags:

views:

10

answers:

1

I have example.com/xml/index.php and I want to access it with this url example.com/xml/title/ and last part would be GET var for index.php and it should show result using that var, what code should I add in my .htaccess file ? Thanks

A: 

Try this in the .htaccess file in your document root:

RewriteEngine on
RewriteRule ^xml/([^/]+)/$ xml/index.php?var=$1
Gumbo
seems work, just one small issue it's working only with last slashexample.com/xml/title/ but isn't w/o that example.com/xml/title
Tom
@Tom: This this rule instead: `RewriteCond $1 !=index.php RewriteRule ^xml/([^/]+)/?$ xml/index.php?var=$1`
Gumbo
ah, great! Thanks a lot that's working!
Tom