473,854 Members | 1,762 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to display a different URL than the actual?

mikek12004
200 New Member
I want to show a different URL in the browser than the actual
e.g.
www.mysite.com/folder1/page1.php
where
www.mysite.com/tabs.php?a=1&b= 2&c=3
and of course still showing the same page and be able to get the values of a,b,c. Any idea?
From some digging I found that they are called nice URL or URL aliases. Someone recommend htaccess (though I have no idea what it is)
What is the best solution? Note also that if possible I would like to dynamically generate the nice URLs. e.g. I have a table in mssql with pair of values like '109' 'rise_up', i want the actual URL www.mysite.com/tab.php?id=109 to be shown as www.mysite.com/rise_up.php do you know any possible method?
Sep 15 '08 #1
5 11735
numberwhun
3,509 Recognized Expert Moderator Specialist
You want to take a look at the mod rewrite engine.

Regards,

Jeff
Sep 24 '08 #2
mikek12004
200 New Member
Well I did -not that I have understand much, until I do could anyone who already done that give me some pointers (an example would be nice); I simply want the URL www.mysite.com/page.php?q=4&a= 7 to be swoed as www.mysite.com/albums/
Sep 25 '08 #3
mikek12004
200 New Member
found a very helpfull guide at
http://roshanbh.com.np/2008/03/url-rewriting-examples-htaccess.html
I know all the basics now, what I want to learn is how depeding on the values of two GET variable in the url to display a different address
eg the www.mysite.com/index.php?page= 1&kwd=12
I want if page=1 and kwd<11 to display www.mysite.com/albums
and if page=1 and kwd<11 to display www.mysite.com/songs
help anyone?
Sep 25 '08 #4
mikek12004
200 New Member
A question, with .htaccess I can type in the URL
www.mysite.com/index22 and get actually www.mysite.com/index.php?var=2 2 however if I have a link in this page linking to www.mysite.com/index.php?var=2 2 and click it the browser will show www.mysite.com/index22 or not? Because I have already constracted the site with many links linking to actual files and I do not want to change them all. I want went the user types www.mysite.com/index.php?var=2 2 the address in the URL to become www.mysite.com/index22 is it possible?
Sep 25 '08 #5
numberwhun
3,509 Recognized Expert Moderator Specialist
A question, with .htaccess I can type in the URL
www.mysite.com/index22 and get actually www.mysite.com/index.php?var=2 2 however if I have a link in this page linking to www.mysite.com/index.php?var=2 2 and click it the browser will show www.mysite.com/index22 or not? Because I have already constracted the site with many links linking to actual files and I do not want to change them all. I want went the user types www.mysite.com/index.php?var=2 2 the address in the URL to become www.mysite.com/index22 is it possible?
I think if that is the case, then you would write the rule the other way to rewrite in the opposite direction. Haven't tried it though.

Regards,

Jeff
Sep 25 '08 #6

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

Similar topics

3
2909
by: Bob Mariotti | last post by:
Guru's; I have a site where a new cgi script (perl) collects a LOT of information from a server before formatting it and displaying a dynamic page to the client. The time delay can be from 3 to 20 seconds. I have been trying to display an interim page with an animated gif and a please wait type of message which would be replaced by the actual resulting page.
6
6206
by: Sandman | last post by:
I'm having some problem here... I have a javascript I've downloaded that goes through all PNG files and enables the transparency channel in them for IE5.5+ by converting them to SPAN layers with the image as background. This works great until I put one of these PNG files inside a display:none block and later sets the block to display:block - then the SPAN (that was the PNG <img>) remains hidden.
4
2486
by: Joe Van Meer | last post by:
Hi, Is the datalist meant for one table or can I use it to display information from 2 different tables? Or should I be looking at a datagrid instead? I began my code and kinda ran into a snag where my last two columns I am displaying are ID fields, one for clientid and the other for empid. What I would really like is to display their actual names instead of the ids.
4
1436
by: mukeshhtrivedi | last post by:
I have TYPE field which has 3 data like HEAD, TRACK and PANEL. Now whenever any person works on HEAD we put 8 Hrs in HRS filed and in LABOR field it reflects the dollar value automatically like $160 (8*20=160).Now I want to display the total of Head, Track and Panel in following; Actual Cost for Head: (All head total should display here if I have more than one head work) Actual Cost for Track:(All head total should display here if I...
3
2122
by: JDC | last post by:
Hi all, Is there a recommended way (i.e. not a bodge) to get a GridView to always display decimal numbers using a dot as the decimal separator, regardless of the locale the user is viewing the page from? (I.e. 3.1415 not 3,1415) Thanks in advance, Jeremy
25
2495
by: Dave | last post by:
Hello. In trying to get an anchor element to stylistically match an input or button element, I find that the button and input cannot be styled according to the 2.1 CSS spec. For example, I expected this ruleset: ..but { display: block; background-color: red; font-size: 14px; text-decoration: none; line-height: 16px; width: auto; height: 16px; padding: 0; margin: 0;
2
8485
by: rn5a | last post by:
The different Validation controls like RequiredFieldValidator, RangeValidator etc. have a property named Display. This property can have 3 values - Dynamic, Static & None. What's the difference between the Dynamic Display & Static Display? Also suppose a Form has 2 TextBoxes & both the TextBoxes have the RequiredFieldValidator. The Form has a Button as well. <form runat="server"> First Name: <asp:TextBox ID="txtFName" runat="server"/>
11
2413
by: vila | last post by:
Hi, I would like to display digits with a 7-bar display, as in a pocket calculator. Any ideas about how to do this? Francis
15
3173
by: cssExp | last post by:
hello, Rather than going on a wild explanation on what's the the problem, it'll be much quicker and easier if i let you look at it yourself, so I'll post my page source (actual contents taken out, of course). <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Language" content="en-us" />
0
9903
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10766
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10373
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9525
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7921
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7083
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5753
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5946
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4565
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 we have to send another system

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.