I'm sure by posting here in stackoverflow with the requirements I can get the solutions.
I'm working on a web application where I have pages and inside on each page, there are posts features and questions. For which I have two tables in SQL posts and questions. Now What I want is:
1: When a user clicks on the post link (inside in page), the user has to redirect to a single post page with SEO friendly URLs which is working.
RewriteRule ^pages/([\w-]+)/?$ page.php?pages=$1 [QSA,NC,L]
RewriteRule ^pages/([\w-]+)/([\w-]+)/?$ page.php?pages=$1&title=$2 [QSA,NC,L]
pages is for GET page query
titles is for GET post query
question now i need for GET Question query on the same page which I used for post GET query.
2: When a user clicks on the question link (inside in page), the user has to redirect to a single question page.
Working example.com/pages/my-page/my-page-first-Post
Required example.com/pages/my-page/my-page-first-Question
This data comes from two different SQL tables