rule for .htaccess mod_rewrite

lalit_7

New Member
Messages
2
Reaction score
0
Points
0

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
So called "search engine friendly URLs" aren't always that. The reason for rewriting URLs is so they're RESTful. Focus on users & standards and the rest will come. Read Google's official position on URLs.

The path portion of URLs is hierarchical. You should be using rewrites only if the named cid is a category containing the named subid, and is in turn contained by "affiliate-programs-directory". If the page content doesn't vary depending on the cid and subid, keep them as query parameters.

This particular set-up is so simple I'm going to recommend you first read a rewriting tutorial, such as Apache's rewrite guide. You'll also need to remove the ".html" from the public URL. By the way, that better not be some script (e.g. PHP) where you've configured every HTML page to be processed by PHP. If so, you should rename all the PHP scripts to have the PHP extension, then use rewrites (or content negotiation, via MultiViews) to remove the extension from URLs (what are sometimes called "clean URLs").
 
Top