473,395 Members | 1,675 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,395 software developers and data experts.

Mod rewrite question

Kelicula
176 Expert 100+
I am trying to make the url change, and STAY that way.

I would like to change url's of this type:

[code]http://www.domain.com/someword/somenumber[/codel]

into...

Expand|Select|Wrap|Line Numbers
  1. http://www.domain.com/cgi-bin/someword.cgi?id=somenumber
I have that working, but what if I want the url in the address bar to change to:
Expand|Select|Wrap|Line Numbers
  1. http://www.domain.com/someword/somenumber
AND STAY THAT WAY, while actually routing me to:
Expand|Select|Wrap|Line Numbers
  1. http://www.domain.com/cgi-bin/someword.cgi?id=somenumber
Is this possible?
Is mod_rewrite what I need?
Or something else.

I have seen many sites that use Perl, that DO NOT have the cgi-bin/script.cgi format on their pages.

How do they do it?
Apr 11 '09 #1
3 1868
Markus
6,050 Expert 4TB
Yes it is possible using rewriting.

Check out some of these results.
Apr 12 '09 #2
Kelicula
176 Expert 100+
Alright man, thanks!!

I just had to remove the "R". For some reason I had the R=301 modifier.
So it would re route you to correct script, but it would change the url in browser too. Without the R, it leaves the url entered untouched.

Works great now!!
Apr 12 '09 #3
Markus
6,050 Expert 4TB
@Kelicula
Yep, the R forces a Redirect.

Glad you got it working,

- mark.
Apr 12 '09 #4

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

Similar topics

1
by: clintonG | last post by:
Let's face it, Firefox is slow, buggy and does not support DHTML, JavaScript or accessibility any better than any other browser but does in fact do a much worse job in many regards notably its...
2
by: VM | last post by:
I'm about to work on a 'buggy' WIndows C GUI application that was entirely made in C. All the user controls were all hard-coded and the code is pretty hard to understand. The application was made...
5
by: T | last post by:
Hi group, I'm trying to create a temporary replacement scheme for a particular url that gets generated all over an existing app. It would be very difficult to find every spot where the url gets...
1
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...
3
by: Jeeran | last post by:
I need to perform url rewriting to convert this (for example): /blogs/feeds/popular/posts/ to this: /blogs/feeds.aspx?type=popular&type2=posts What I did was the following: 1. Created an...
14
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...
4
by: mainargv | last post by:
hi How do you rewrite codes with " ... va_list va_start va_etc", so that simple c compiler don't have to deal with them. I have written a simple c->verilog compiler but it can't deal with...
10
by: not_a_commie | last post by:
I've seen studies before showing that it is better to rewrite code when more than 25% (or whatever) of the code needs to be changed. I can't seem to locate any references for that at the moment. Do...
6
by: greenxiar | last post by:
How to get the function from "rewrited interface implement"? interface I { int Value { get; } } class A : I { int I.Value { get { return 1; } } } class B : I { int I.Value { get { return 2;...
3
by: aag | last post by:
Hey there! I've got an URL rewrite issue that I'm wondering if the masters out there can help with :) I have a site that resides at (for example) foo.com - it's a full site with tons of pages...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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
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
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...

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.