TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   The Lounge (http://www.talkphp.com/lounge/)
-   -   Help With Mod Rewrite (http://www.talkphp.com/lounge/2164-help-mod-rewrite.html)

ETbyrne 02-01-2008 03:29 PM

Help With Mod Rewrite
 
Hey everyone! I'm very bad at MOD_REWRITE and was hoping you guys could help me out.

What I want to do is when the URL page is in the address bar the sever reads bin/index.php?page=page instead of page without redirecting.

Thanks in advance. :)

Gurnk 02-01-2008 09:05 PM

MOD_REWRITE WIZARD // beta

Thats what I use. :)

SOCK 02-12-2008 06:35 PM

A bit late, but
Code:

RewriteEngine on
RewriteBase /
RewriteRule ^([a-zA-Z0-9]+)$ bin/index.php?page=$1 [NC,L]

Does that help? You might consider using a specific set of pages to choose from, e.g. 'main','calendar','forum', etc and have the rules set to
Code:

RewriteRule ^(main|calendar|forum){1}$ bin/index.php?page=$1 [NC,L]

ETbyrne 02-12-2008 07:59 PM

Thanks! :-D


All times are GMT. The time now is 08:52 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0