Jump to content

PHP URL Structure


johnslater

Recommended Posts

I have been having problems finding this in Google people i simply dont know what to search for. So to explain further i have some examples below.

 

BEFORE: http://www.slaterjohn.com/index.php?page=contactus

 

And i want it to look like this....

 

AFTER: http://www.slaterjohn.com/page/contactus OR http://www.slaterjohn.com/contactus

 

If anyone knows of a good tutorial for beginners or if someone wants to simply post a help thing in here that would be awesome.

 

Thanks, John Slater

Link to comment
https://forums.phpfreaks.com/topic/87784-php-url-structure/
Share on other sites

Found the perfect result from that, thanks.

 

http://corz.org/serv/tricks/htaccess2.php if anyone is interested.

 

Problem is im having a problem with my style sheet and images, when the HTML calls them in its calling from the wrong folder which is understandable.

 

Any way round this? to always make it look in the correct location?

Link to comment
https://forums.phpfreaks.com/topic/87784-php-url-structure/#findComment-449021
Share on other sites

all your file pointers should point to legit files that resolve.

 

in php if its an internal pointer (like an include require etc.) it must have a valid in server file pointer (like open your my documents as c:\users/myname/mydocuments/) 

 

in html files it simply has to resolve to a valid file.  so you could have the modrewrited address in links, refs, srcs so  long as they resolve according to the proper files.  i.e

if yoru css is at http://www.mydomain.com/css/mycss.css 

but you have modrewriets to say its at

http://www.mydomain.com/cssdoc/

 

you can reference with  either one cause they both would resolve.

 

But if you have a php include for that you must include the valid internal path include('css/mycss.css'); assume we are at thee public_html root

Link to comment
https://forums.phpfreaks.com/topic/87784-php-url-structure/#findComment-449091
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.