How do i change

Hi Friends,

How do i rewrite dynamic page url’s into search engine friendly url for whole website? Should i need to add mod-rewrite code? If so, can you please share with me here mod-rewrite code.

Awaiting for your reply…

You probably need to give some indication of your URL structures so that suggestions can be given on how to rewrite them. Can you post a few examples? (They don’t have to include your real domain if you prefer not to reveal it.)

My website pages are displaying following types of url’s,

http://www.example.com/index.php?option=com_content&view=article&id=25&Itemid=82

http://www.example.com/index.php?option=com_content&view=article&id=28&Itemid=86

How do i redirect all my pages to search engine friendly url’s?

LGW,

Check the mod_rewrite tutorial (with sample code) linked in my signature for your answers. Then consider what I’ve done at http://wilderness-wally.com for his links (using the page title rather than Itemid as you’re using) - that’s SEO Friendly!

Regards,

DK

Hi dklynn,

Can i use this rewrite for my site?

RewriteCond %{IS_SUBREQ} false
RewriteCond %{QUERY_STRING} id=([a-zA-Z]+)
RewriteRule ^index\.php$ %1? [R=301,L]

Is this right code?

LGW,

Yes, you could but that would redirect from a file that Apache can server to something it cannot, i.e., 404. Please reread the tutorial as one of the first lessons is the direction of the mod_rewrite direction (from something which can’t be served to something that it can serve - okay, you can program “loopy” redirections, too, but that’s a more advanced topic). Have another look at http://wilderness-wally.com/ and look at the article URIs (which are all article titles, not IDs and certainly not file names).

Regards,

DK

ok let me try that code…