Forum Moderators: phranque

Message Too Old, No Replies

Re-Writing synamic URL To keyword rich url

Re-Writing synamic URL To keyword rich url

         

salik123

6:31 am on Dec 7, 2011 (gmt 0)

10+ Year Member



Hi Members,

I need urgent help..

I am running my site on Apache Sever with Joomla CMS. I need to re-write a dynamic url to keyword rich url...

For Example..

The dynamic url is [sanjeevnigroup.com...]

I want to re-write it to http://www.example.com/keyword-rich-url.html

Can you please give me the mod_rewrite code for this..

wilderness

6:41 am on Dec 7, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Welcome to Webamster World

Forum charter [webmasterworld.com]

It is not appropriate to expect other members to write your code for you or to debug your entire project; Please don't expect other members to solve a problem you don't want to begin solving yourself.

Don't get upset if someone has the answer but wants to provide you with resources and material to help you solve it on your own. After all, the most educational threads are those where members learn how to help themselves. Such threads also prove to be of most value the next time someone has a similar question.

Before posting a new thread, please try looking through the older posts in the forum index. Someone may have recently asked the same question, and you may benefit from the posted answers. Using the WebmasterWorld search function or the site-specific search feature of major search engines may help you find exactly what you are looking for on WebmasterWorld.

Please describe your server environment and include whatever research and testing you've done so far. This will help the members who are willing to help you, and increase their number, too. Better, more-detailed questions get faster, better, and more-detailed answers, since the other members won't have to ask you for more information.

Please do not post specific details such as domain names, full IP addresses, or personally-identifiable information such as name, e-mail address, IM screen name, etc. Such specifics will be edited or removed in accordance with our Terms of Service [webmasterworld.com], which may render your post meaningless. Please replace all instances of your domain name with "example.com" before posting.

Please do not post links to "test page" URLs, tiny-URLs, screen-shot URLs, personal URLs, or commercial URLs of any nature. Generally, .edu and .org URLs are OK. We prefer to direct members to authoritative non-commercial resources in order to prevent any possible conflicts of interest. Furthermore, posted example links may quickly become outdated, rendering the thread useless to someone reading it just a few months from now. Verbalized problem descriptions will be useful for years to come.

"Fix my code" and "Do my homework for me" threads:

This is a discussion forum, not a help desk or a free code-writing service; If you have a problem, please try to research it and then phrase your post in a manner conducive to general discussion of the issue. Rather than providing one-off solutions, we prefer to help people find resources to help themselves.

A general guideline for code-related problems is: Post your own code and describe what you hoped it would accomplish. Then describe how it fails and include all relevant information from your server error logs. Too-general posts in the form of "What code do I use to do this?" often go unanswered for a long time.

The following resources are often referenced in our Apache forum, and may help to answer or focus your questions.

Webmaster World Search next to LOGIN

Forum Library [webmasterworld.com]

salik123

6:55 am on Dec 7, 2011 (gmt 0)

10+ Year Member



I am new to url re writing, i have been trying to solve this, but unable to succeed in this. In the websiet, i have used the keyword rich url for navigation, but i found this url in yahoo.. Dont know from were this url is coming...

I have the url as http://www.example.com/keyword-rich-url.html, but other dynamic url is also being indexed by yahoo..

I tried this code

RewriteRule ^index.php?option=com_content&view=category&layout=blog&id=61&Itemid=92$ http://www.example.com/keyword-rich-url.html [R=301,L]

g1smd

7:38 am on Dec 7, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



RewriteRule sees only the path part of the the URL request. You need a RewriteCond looking at QUERY_STRING or THE_REQUEST to make this work.

In order to prevent an infinite loop you'll need to check that index.php was in THE_REQUEST. Whether you use THE_REQUEST or QUERY_STRING to check the query string value is up to you.

Don't forget to escape the literal periods.

It does sound like you're using an SEF module that is incomplete in what it does. Any decent SEF module would have facilities to prevent duplicate content built in from the get go.