Forum Moderators: phranque
My e-commerce site is created through Miva Merchant 4.12. It is obvious that the there are two problems with the url's Miva generates that lead to google not indexing them.
#1 the "?" apparent in all urls
#2 the length of most of these urls are extremely long
So with help from this site and others I have learned of the possible solution of using the mod_rewrite module that is available on my hosts apache server. I understand to create an .htaccess file in my directory but I cannot find a clear example of the actual programming command needed to do the mod_rewrite.
For example how would I write a command to make the following change:
I want to rename url:
[widget.com...]
as
http:/widget.com/redwidgets.html
or something similar that is more compact and simple. Does anyone have any idea of how to do this. I figure once I have one example I can copy it for my other urls. I have visited apache's resource site and other mod_rewrite sites but they are so complicated I cannot find what I am looking for.
Thanks so much in advance to any helpers out there.
-TylerH
If not then I will keep doing what I am doing...when I can.
Thanks
mod_rewrite can do what you asked for, but rewriting this way is not a good solution because it requires an external redirect on each access to an object (page, graphic, script, etc.).
The way to avoid that is to use and publish short readable links, and translate (internally redirect) those into the complex script-parameter-passing URLs for use only inside your site. What you asked for is a way to do the opposite, which would require you to redirect the user's browser and the search engine robots for every access:
Rewrite [widget.com...]
.....to http:/widget.com/redwidgets.html
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{QUERY_STRING} ^Screen\=CTGY\&Store\_Code\=GE\&Category\_Code\=1\+(.*)$
RewriteRule ^Merchant2/merchant\.mv$ /%1.html [R=301,L]
Technically this should work, but I don't think it does what you really want to do. :(
Mod_rewrite documentation [httpd.apache.org]
Jim
I'm not sure which approach you're asking about here, but the idea is to present the client browser or robot with short, concise "friendly" URLs, and then translate requests for those URLs to whatever is needed internal to your server to access the requested resource.
For example, the users and robots see "mydomain.com/big-red-widgets", but the actual URL might be mydomain.com/homecare/shopping.pl?userid=1234567890&refer=ebay&prod=widget&size=large&color=red&sale=true
So yes, any link "seen" by the user's browser or by a robot should be the "friendly" URL. It would not be necessary to use "friendly" URLs for images or scripts, but any link the user might click on, or any link you might want a robot to follow should be "friendly".
Obviously, this kind of technique is best implemented from the start of a new site design.
Jim