473,503 Members | 1,691 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Mod Rewrite 301 Help

162 New Member
I need to 301 some links. I have been getting my knees wet with ModRewrite for a while now, but this one seems to throw me. The format I'm looking for is below.

Old - http://www.sitename.com/big-widget/blue/2.html

New - http://www.sitename/blue-big-widgets/2.html

Two thinks to note, I have added a (s) to the end of widgets. As well as the 2.html will be any number between 1-100 depending on the page.

Thanks for your help in figuring this out.
May 6 '11 #1
1 1713
empiresolutions
162 New Member
The solution I ended up going with was

Expand|Select|Wrap|Line Numbers
  1. RewriteRule ^(big-widget)/([^/\.]+)/(.*) $2-$1es/$3 [R=301,L]
A more dynamic version is

Expand|Select|Wrap|Line Numbers
  1. RewriteRule ^([^/\.]+)/([^/\.]+)/(.*) $2-$1es/$3 [R=301,L]
May 9 '11 #2

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

Similar topics

5
3611
by: | last post by:
I am having a major problem with file transfers - they are ending early when the bandwidth tops-out. Smaller files transfer just fine, but large files (12Mb+) can 'abort' the transfer after maybe...
0
1522
by: Link | last post by:
Hello!I am new to Python and I would like to rewrite the following code to python use to call by C program:// JPython code ======================================= import...
1
2115
by: baroque Chou | last post by:
Thanks for the help available on msdn, I have succesful done the rewrite job. But there are 2 problems arise: 1.when I try to rewrite the url from say: www.yoursite.com/beverages.aspx to...
7
1153
by: Stan Canepa | last post by:
I am looking for good documentation to help support rewriting a VB 6 app in Dot Net. I looking for things like VB 6 being unsupported in March 2008, general performance improvements, at what point...
14
1800
by: Stan Canepa | last post by:
This post is mostly for discussion. Why rewrite in .NET? Just a general discussion not related to any specific details. I was just looking to see what reasons developers are looking to, to help...
1
1961
by: JumpingOffPlace | last post by:
Hi, I'm hoping that the wealth of knowledge here can stop me from spinning my wheels on this syntax error for hours. :) Below is the code, and the error I am recieving.... Code: <!DOCTYPE...
0
3366
by: 1978 | last post by:
Hey Guys I need some help. Firstly: Running Rails 2.0.x cPanel Version 11.16.0-RELEASE Shared hosting. My App is not in public_html/ but under home/usr/rails_apps/(rubyapp)
4
1360
by: vinpkl | last post by:
hi all i have a url like i used rewrite to make it seo friendly it gives me
0
7282
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7339
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...
1
6995
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5581
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
4678
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3157
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1515
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
389
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.