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
views:
10answers:
1
A:
Try this in the .htaccess file in your document root:
RewriteEngine on
RewriteRule ^xml/([^/]+)/$ xml/index.php?var=$1
Gumbo
2010-08-05 18:17:58
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
2010-08-05 19:04:18
@Tom: This this rule instead: `RewriteCond $1 !=index.php RewriteRule ^xml/([^/]+)/?$ xml/index.php?var=$1`
Gumbo
2010-08-05 19:20:42
ah, great! Thanks a lot that's working!
Tom
2010-08-05 20:10:04