hii,
i have some dynamic urls which are indexed by google , but all my urls are static as generated by htaccess, dont know how those urls got indexed, so whenever some one visits through google , he cant get page 2 on same url,as that generates 404 error
eg

/mcq.php?mcq_id=149&page=1‎

this url is indexed by google where as it should be

/computer/exam/mcqs/ms-word/questions/149/1.html

i have many pages like this
htaccess has following rule

RewriteRule (.*)/(.*)/mcqs/(.*)/(.*)/(.*)\.html mcq.php?mcq_id=$4&page=$5 [L]

dont know how to handle this

Member Avatar for diafol

I'm not sure about the rewrite. Do these groups need to be captured? ALso the number looks wrong. Your smart url has 4 groups follwing the '/mcqs/' but your rewrite only has 3.
Does this do anything...

RewriteRule [^/]*/[^/]*/mcqs/[^/]*/[^/]*/([^/]*)/([^/]*)\.html mcq.php?mcq_id=$1&page=$2 [L]

I think the [^/]* stops the groups from including the forward slash as being part of them.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.