473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

URL Rewriting issue

106 100+
Hi,

I have below code in my .htaccess file

DirectoryIndex default.asp index.asp index.html index.htm
ErrorDocument 404 /errors/404.asp

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]
RewriteRule (.*)/stock-labels/(.*)/(.*)$ labels/stock-labels/show_sub_cats.asp?scode=$3

My link are as follows.
http://www.domain.ca/labels/stock-labels/Shipping%20Labels/A54P
http://www.domain.ca/labels/stock-labels/Dangerous%20Goods/A21

When I click these links. 301 redirect occur to the desired page
I am seeing the below urls in browser address bar
http://www.domain.ca/labels/stock-labels/show_sub_cats.asp?scode=A54p


http://www.domain.ca/labels/stock-labels/show_sub_cats.asp?scode=A21

While I don't want this. I want to show these urls in browser
http://www.domain.ca/labels/stock-labels/Shipping%20Labels/A54P
http://www.domain.ca/labels/stock-labels/Dangerous%20Goods/A21

Please help me.
Apr 21 '11 #1
0 840

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Max | last post by:
I've got a comment that dreamweaver uses that VS.NET keeps moving. I'm wondering if there anyway to stop VS.NET from moving my code around VS.NET changes: </body> <!-- InstanceEnd --> </HTML>...
2
by: Jon Maz | last post by:
Hi All, I've been looking into options for URL Rewriting in .net, and to be honest, I haven't seen anything that's easier than the old Classic Asp solution with an ISAPI filter redirecting to an...
0
by: Lee | last post by:
Hi all ;) Preamble -------- I'm using URL rewriting to enforce a frames policy (yeah, I know frames are 'bad' :) - i.e. if a request comes in for a page which should be nested within a...
0
by: Netveloper | last post by:
Hi, I'm playing around with url rewriting and I have come across a problem which I can't seem to get past. The general ide is to have a IHttpHandlerFactory class which checks the incoming...
1
by: Ryan | last post by:
Im building a mutli-lingual website in .net 2.0 and Im having an issue with url rewriting and Im having an issue with the xml sitemap provider and menus. If i have a url:...
3
by: Greg Collins [Microsoft MVP] | last post by:
I have done a bit of research of Url Rewriting, but as yet have been unsuccessful at getting it to work well, and there are issues around what file types are supported and how much code you want to...
8
by: =?Utf-8?B?bXVzb3NkZXY=?= | last post by:
Hi guys I'm having trouble with URL rewriting using HttpApplication.Context.RewritePath in a web application I've created. Everything works, but the links (css, images) in the pages break when...
2
by: Moistly | last post by:
Has ever tried to do URL rewriting in ASP.NET 2.0 ie I have no trouble on my own machine but it just doesn't seem to work dev server Basically I am trying to map something like ...
7
by: Joe | last post by:
I'm trying to use the Application_BeginRequest to re-write the path but it doesn't work on the published site when a non-existing URL is called. This does work fine in my dev environment. For...
0
by: psycho | last post by:
i have added url rewriting to my site. i am filling custom objects in context.items collection and then rewriting path the problem is that the page is url rewriting code is being hit two times...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.