PDA

View Full Version : ?page=home



Ceoxe
28-03-2007, 02:26 AM
how do you code a layout so that when you do a link or something like that etc it shows up as yoursite.com/?page=home? Is it CSS or something? +REP for tuts or help.

QuickScriptz
28-03-2007, 03:23 AM
I love how everyone is always like "i'll give you rep if you..." - most other forums barely know the rep system exists... but anyways...

No silly! Not CSS or any other coding language for that matter. It is all server-side using an .htaccess file, mod_rewrite to be specific, you just change the way the browser enterperets a file/link. A link to a tut that might be helpful is below. Good luck! Its pretty straight forward anyways....

Links in order of most helpful:
1. http://corz.org/serv/tricks/htaccess2.php
2. http://www.webmastertips.us/tutorials/mod_rewrite.htm
3. http://www.webmasterwoman.com/design-development/htaccess-redirection.html

Agnostic Bear
28-03-2007, 03:53 AM
I love how everyone is always like "i'll give you rep if you..." - most other forums barely know the rep system exists... but anyways...

No silly! Not CSS or any other coding language for that matter. It is all server-side using an .htaccess file, mod_rewrite to be specific, you just change the way the browser enterperets a file/link. A link to a tut that might be helpful is below. Good luck! Its pretty straight forward anyways....

Links in order of most helpful:
1. http://corz.org/serv/tricks/htaccess2.php
2. http://www.webmastertips.us/tutorials/mod_rewrite.htm
3. http://www.webmasterwoman.com/design-development/htaccess-redirection.html


Umm, what about


<?php
if($_GET["page"] != "")
{
include("{$_GET["page"]}");
}
?>


O_o

Tomm
28-03-2007, 06:38 AM
Err what the hell are you on about?

Its using PHP or ASP.net or any server-side language really..


I love how everyone is always like "i'll give you rep if you..." - most other forums barely know the rep system exists... but anyways...

No silly! Not CSS or any other coding language for that matter. It is all server-side using an .htaccess file, mod_rewrite to be specific, you just change the way the browser enterperets a file/link. A link to a tut that might be helpful is below. Good luck! Its pretty straight forward anyways....

Links in order of most helpful:
1. http://corz.org/serv/tricks/htaccess2.php
2. http://www.webmastertips.us/tutorials/mod_rewrite.htm
3. http://www.webmasterwoman.com/design-development/htaccess-redirection.html

Florx
28-03-2007, 07:37 AM
I love how everyone is always like "i'll give you rep if you..." - most other forums barely know the rep system exists... but anyways...

No silly! Not CSS or any other coding language for that matter. It is all server-side using an .htaccess file, mod_rewrite to be specific, you just change the way the browser enterperets a file/link. A link to a tut that might be helpful is below. Good luck! Its pretty straight forward anyways....

Links in order of most helpful:
1. http://corz.org/serv/tricks/htaccess2.php
2. http://www.webmastertips.us/tutorials/mod_rewrite.htm
3. http://www.webmasterwoman.com/design-development/htaccess-redirection.html
Thank you sooooo much for the links! Tar +Rep

Xiwl
28-03-2007, 09:48 AM
I love how everyone is always like "i'll give you rep if you..." - most other forums barely know the rep system exists... but anyways...

No silly! Not CSS or any other coding language for that matter. It is all server-side using an .htaccess file, mod_rewrite to be specific, you just change the way the browser enterperets a file/link. A link to a tut that might be helpful is below. Good luck! Its pretty straight forward anyways....

Links in order of most helpful:
1. http://corz.org/serv/tricks/htaccess2.php
2. http://www.webmastertips.us/tutorials/mod_rewrite.htm
3. http://www.webmasterwoman.com/design-development/htaccess-redirection.html
What the hell are you on about?

Heinous
28-03-2007, 10:07 AM
I love how everyone is always like "i'll give you rep if you..." - most other forums barely know the rep system exists... but anyways...

No silly! Not CSS or any other coding language for that matter. It is all server-side using an .htaccess file, mod_rewrite to be specific, you just change the way the browser enterperets a file/link. A link to a tut that might be helpful is below. Good luck! Its pretty straight forward anyways....

Links in order of most helpful:
1. http://corz.org/serv/tricks/htaccess2.php
2. http://www.webmastertips.us/tutorials/mod_rewrite.htm
3. http://www.webmasterwoman.com/design-development/htaccess-redirection.html
Hahahaha, oh man, I lol'd.

F32
28-03-2007, 04:22 PM
lol.

Course PHP is a coding language.

It's just includes aye?

Luckyrare
28-03-2007, 04:27 PM
lol.

Course PHP is a coding language.

It's just includes aye?

No, its $_GET

mod_rewrite can be used to make the urls using $_GET more SEO friendly.

Invent
28-03-2007, 05:04 PM
No, its $_GET

mod_rewrite can be used to make the urls using $_GET more SEO friendly.

I don't really use mod_rewrite/htaccess.

But im guessing by that you mean like say: "<anything>.php" open "pages.php?page=<anything>" ?

Luckyrare
28-03-2007, 05:07 PM
I don't really use mod_rewrite/htaccess.

But im guessing by that you mean like say: "<anything>.php" open "pages.php?page=<anything>" ?

Yuh, most some search engines dont bother with them so its good to have.

timROGERS
28-03-2007, 07:39 PM
Yuh, most some search engines dont bother with them so its good to have.

Danny is right ;) Most search engines ignore URL's with parameters, and just take the GET off of the end. On the other hand, if you use a htaccess with MOD_REWRITE to create URLs without special characters, then the search engines are more likely to favour you.

I know Scriptz method of doing this was unusual, but it would still work.

Hypertext
28-03-2007, 09:05 PM
I love it how Scriptz insults a forum member.
Then assumes the guys using Joomla 'Mod_rewrite'
looool, it's using PHP; LolCopters explained it perfectly use his method ;P

Luckyrare
28-03-2007, 09:31 PM
Yuh, most some search engines dont bother

Why the hell did I write most some, I do some wierd things... Anyway

@ Then assumes the guys using Joomla 'Mod_rewrite'

When did anyone say anything about joomla? O.o

QuickScriptz
28-03-2007, 11:35 PM
Well then - ya I guess that makes sense to use GET's - I use them for my DJ Panel's timetable to simplify matters... but ya ur right, htaccess is just to help make it more "SEO Friendly" as you put it...

Don't know what I was thinking O.o I was a little out of it at that time, but anyways ya, using php get would be easiest!

Also: Whoever left the (-) rep needs to understand that this is a "helping" community... to learn/correct! Not insult!


I know Scriptz method of doing this was unusual, but it would still work.

Mentor
29-03-2007, 06:49 PM
I love how everyone is always like "i'll give you rep if you..." - most other forums barely know the rep system exists... but anyways...

No silly! Not CSS or any other coding language for that matter. It is all server-side using an .htaccess file, mod_rewrite to be specific, you just change the way the browser enterperets a file/link. A link to a tut that might be helpful is below. Good luck! Its pretty straight forward anyways....

Links in order of most helpful:
1. http://corz.org/serv/tricks/htaccess2.php
2. http://www.webmastertips.us/tutorials/mod_rewrite.htm
3. http://www.webmasterwoman.com/design-development/htaccess-redirection.html

If your aim was to waste processor cycles and alot of your own time, maybe? But most people would just use a php page, if a select case statment and a get varible, saves alot of time, and is a codeing language o.0
Mod rewrite is more useful if you want to turn bla.php?p=cake&t=chocolate in to bla/cake/chocolate or something. useing it backwards seems kinda pointless.

Want to hide these adverts? Register an account for free!