Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

A link that not exists

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

A link that not exists

Postby mblascog » Tue Feb 26, 2013 3:17 pm

Hi,
I'm new in PHP. I'm studying a web that a costumer has ordered.
There is a thing that I can't understand. There is an image with a link to an url that doesn't exists:

Code: Select all
<a href="../dir1/flats" target="_blank"><img src="../img/flats.jpg" alt="flats to rent" />


In the folder dir1 does exists no web.

If I run this web in the server I can't understand how, but a web appears with this address. But when I run it in my localhost, the navegator says that the url doesn't exists.

I've read in Google some sites where speaks about how to create an hiperlink in php, but I can't understand. Can anybody tell me how it works or a link where to learn it?

Thanks very much
mblascog
New php-forum User
New php-forum User
 
Posts: 5
Joined: Tue Feb 26, 2013 12:00 am

Re: A link that not exists

Postby iam4423 » Thu Mar 07, 2013 6:14 am

im a little unclear on what you are asking here but if i have it right then the folder that the anchor tag is targeting doesn't actually exist but on the website you get a page to load at that address.

my best guess would be that the live version of the wibsite is using a .htaccess rewriteRule to direct the request elsewhere.
if this is the case then on the webserver (most likley the root) will have a file called .htaccess
int the file you will find a line something like RewriteRule ^dir1/flats$ file.php?location=$1 [L, QSA]

i could be going in the wrong direction here but if this is the case read up on apache's rewrite engine
iam4423
New php-forum User
New php-forum User
 
Posts: 50
Joined: Fri Jan 20, 2012 8:00 am


Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron