Forum Moderators: phranque

Message Too Old, No Replies

Simple question about rewrite rule

         

alexeyryb

1:21 am on Nov 23, 2004 (gmt 0)

10+ Year Member



Hello, I need to rewrite the following:

index.php?c=13&s=11

to

13-11.html

Can't find solution about 2 hours. Please, help me.
Sorry, I'm a newbie for this one.

jdMorgan

1:52 am on Nov 23, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



alexeyryb,

Are you trying to make your URLs more search-engine friendly?

If so, put links like "/13-11.html" on your php pages.

Then use mod_rewrite to rewrite those URLs, when requested by browsers and search engine spiders, back to the form index.php?c=13&s=11

(mod_rewrite works after an HTTP request is received, but before the content handler is invoked to serve pages or run scripts. Therefore, mod_rewrite can change incoming, but not outgoing, URLs.)

So normally, rewrites are done in the "opposite direction" from what you are asking for.

Either way, a search for 'rewriterule "search engine friendly" URL' or 'rewriterule static dynamic' should turn up a lot of posts here on how to do it. Also, our charter [webmasterworld.com] contains some helpful links.

Jim