Is there a way to change url string?

by vjboc
13 replies
  • WEB DESIGN
  • |
On my product pages the url string looks like this:
http: //www. qpricing.com/p~p-2626545239~b-11140000~Panasonic-HDC-TM41H-HD-Camcorder-with-16GB-Internal-Flash-Memory-Black.aspx

Is there a way to change it to:
http: //www. qpricing.com/Panasonic-HDC-TM41H-HD-Camcorder-with-16GB-Internal-Flash-Memory-Black

The products are all dynamic. Is there a way to redirect or a code to stick in web.config? This is an asp.net site. Thanks in advance.
I am trying to make it better for SEO. Not unless it is OK the way it is.
#change #string #url
  • Profile picture of the author K Meier
    It's called mod_rewrite. It's an apache extension that rewrites urls. In wordpress the option is called permalinks.
    If you use any kind of other CMS as your website, then I'm sure someone will have written a plugin/extension for this already, or it's available in your admin panel as an option.

    If it's a custom made website, you need to look into mod_rewrite itself and figure it out.
    {{ DiscussionBoard.errors[5634614].message }}
  • Profile picture of the author vjboc
    Thanks guys for the response, I will look into the mod rewrite. Do I have to do each url or is it a code that rewrites all the url strings? Also do I loose the old url?
    {{ DiscussionBoard.errors[5637285].message }}
  • Profile picture of the author K Meier
    You can rewrite them all at once. But as I said, if you are using a well known CMS or eCommerce website, it will most likely already be included as an admin option, or free download as an addon.
    What CMS/eCommerce is your website based on?
    {{ DiscussionBoard.errors[5637423].message }}
    • Profile picture of the author vjboc
      Originally Posted by K Meier View Post

      You can rewrite them all at once. But as I said, if you are using a well known CMS or eCommerce website, it will most likely already be included as an admin option, or free download as an addon.
      What CMS/eCommerce is your website based on?

      Thanks K Meier, In the admin section there is "Allow to remap incoming urls (url rewrite)" check box. When I check this box it does not do anything.

      Is that mod rewrite code a simple code to add? If so What is the code?
      {{ DiscussionBoard.errors[5638473].message }}
  • Profile picture of the author K Meier
    Maybe there is a second option or some adjustments options you didn't see in the admin section?

    There is not general code that can be implemented that works on all sites. It all depends on your filenames and php $_GET variables. If you do it manually, you would really look into some tutorials.
    {{ DiscussionBoard.errors[5638544].message }}
  • {{ DiscussionBoard.errors[5639356].message }}
  • Profile picture of the author windso0
    I don't believe anything changes as far as the role is concerned when you do a VIP swap. Rather, it alters the load balancer configuration.

    So nothing happens in your app to cause it to change configuration. The only thing I can think of is that the URL changes between the two. You could implement code that chose one of two connection strings, based on the URL with which it was accessed (assuming that we're only talking about a web role), but it seems messy.

    Fundamentally, I think the issue is that staging isn't a separate test environment; it's a stepping stone into production. Thus, Microsoft's assumption is that the configuration doesn't change.
    {{ DiscussionBoard.errors[5639701].message }}
  • Profile picture of the author cutegirl36
    You can find out more about "mod_rewrite". Good luck.
    Signature

    Source: friv

    {{ DiscussionBoard.errors[5640234].message }}
  • Profile picture of the author webpeon
    in asp.net you will be wanting to use the routing option, ive never used it for this type of application but its simple enough to do the following for example and change www.mysite.com/profile.aspx?id=48788398283 to www.mysite.com/profile/webpeon so I dont suspect it wouldn't be much harder to accomplish what you are after
    Signature
    Web 2 Mobile
    The Future of The Web
    {{ DiscussionBoard.errors[5640598].message }}
  • Profile picture of the author vjboc
    There is a remapping.config file that has big list of url's like below and in the admin section has a check box for Allow to remap incoming urls (url rewrite). but when I check the box nothing happend. Is ther something I need to add to web.config to make this work?
    <?xml version="1.0" encoding="utf-8" ?>
    <urls>
    <u o="office_supplies.*" n="d~c-office_supplies~b-24.aspx" />
    <u o="office_basics.*" n="m~c-office-basics~b-212.aspx" />
    {{ DiscussionBoard.errors[5643437].message }}
    • Profile picture of the author chevolet
      Banned
      [DELETED]
      {{ DiscussionBoard.errors[6329987].message }}
      • Profile picture of the author luckyber
        I want to remove some params from a URL string:

        For Example:

        I have a string like this:

        var url = '/browse/102?color=red&type=car&rpp=10&ajax=1&change=1';
        and an array like this:

        var ignore = new Array("change","ajax");
        Result:

        /browse/102?color=red&type=car&rpp=10
        What is the shortest and quickest way to achieve this?
        {{ DiscussionBoard.errors[6538186].message }}
  • Profile picture of the author seokid
    You can change url using mod rewrite rules in htaccess file. You can find many mod rewrite tutorials on web
    {{ DiscussionBoard.errors[6538565].message }}
  • Profile picture of the author augusterber
    Banned
    [DELETED]
    {{ DiscussionBoard.errors[6681298].message }}
    • Profile picture of the author ronc0011
      If your site is an ASP site then It almost certainly running on a Windows server ISS, not Apache. ASP is a completely different animal than PHP. Though as someone has mentioned earlier someone probably has already writen something to do what you want. For information about ASP your best bet is Home : Official Microsoft Site There is a forum there where you can find help from developers.
      {{ DiscussionBoard.errors[6682757].message }}

Trending Topics