237 reputation
212
bio website tamilg.in
location Chennai, India
age 29
visits member for 2 years, 8 months
seen Sep 25 '13 at 0:07

I'm a Freelance Web Developer from Chennai, India. Mostly working on WordPress Themes and Plugins.

You can hire me in Elance


Dec
3
awarded  Notable Question
Mar
11
awarded  Popular Question
Nov
30
awarded  Yearling
Nov
21
awarded  Scholar
Nov
21
revised Tricky URL rewrite with custom values in url
added 129 characters in body
Nov
21
comment Tricky URL rewrite with custom values in url
Finally found the issue, it was the browser cache that kept redirecting to the url with query string.
Nov
21
accepted Tricky URL rewrite with custom values in url
Nov
20
comment Tricky URL rewrite with custom values in url
Quite strange, I changed theme to TwentyEleven and tried still the url changes from http://mysite.com/image/wpusername/001 to http://mysite.com/image/?iuser=wpusername&iname=001 (I did copied the custom template to TwentyEleven directory)
Nov
20
comment Tricky URL rewrite with custom values in url
When you check does the url remains same ??
Nov
20
comment Tricky URL rewrite with custom values in url
yes image is the page with custom template set.
Nov
20
comment Tricky URL rewrite with custom values in url
There is similar question wordpress.stackexchange.com/questions/25241/… but couldn't see working answer in that as well.
Nov
20
comment Tricky URL rewrite with custom values in url
yes I did removed the rules from .htaccess, only default WordPress rules are there. Also flushed rewrites again.
Nov
20
comment Tricky URL rewrite with custom values in url
thanks a lot for answer. Your code works but the only issue is when I go to the url http://mysite.com/image/wpusername/001 it redirects to http://mysite.com/image?iuser=wpusername&iname=001. Instead I want the url SEO friendly and unchanged. (Note I changed pagename to image itself instead of custompage)
Nov
20
comment Tricky URL rewrite with custom values in url
@MarioPeshev thanks for comment. Looks like even if I use the template_include hook the url may not remain same. The Rewrite API is working but the url changes to http://mysite.com/custompage/?iuser=myuser&iname=001 instead i want it to remain http://mysite.com/custompage/myuser/001
Nov
20
comment Tricky URL rewrite with custom values in url
@MarioPeshev tried Rewrite API but i guess i'm missing something.
Nov
20
revised Tricky URL rewrite with custom values in url
added additional code
Nov
20
comment Tricky URL rewrite with custom values in url
I tried adding $newrules['image/([^/]+)/?([0-9]{1,})/?$'] = 'index.php?post_type=page&p=564&iuser=$matches[1]&iname=$matches[2]'; to rewrite_rules_array using filter. But ends up getting Memory allocation error.
Nov
20
asked Tricky URL rewrite with custom values in url
Sep
8
awarded  Student
Jun
23
revised W3 Total Cache active but not working (solved)
found solution and updated question