473,395 Members | 1,468 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.

How to display a different URL than the actual?

mikek12004
200 100+
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 11703
numberwhun
3,509 Expert Mod 2GB
You want to take a look at the mod rewrite engine.

Regards,

Jeff
Sep 24 '08 #2
mikek12004
200 100+
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 100+
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 100+
A question, with .htaccess I can type in the URL
www.mysite.com/index22 and get actually www.mysite.com/index.php?var=22 however if I have a link in this page linking to www.mysite.com/index.php?var=22 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=22 the address in the URL to become www.mysite.com/index22 is it possible?
Sep 25 '08 #5
numberwhun
3,509 Expert Mod 2GB
A question, with .htaccess I can type in the URL
www.mysite.com/index22 and get actually www.mysite.com/index.php?var=22 however if I have a link in this page linking to www.mysite.com/index.php?var=22 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=22 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
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...
6
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...
4
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...
4
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...
3
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...
25
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...
2
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...
11
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
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,...
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...
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
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
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
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...

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.