homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

PHP and mod_rewrite problem!

10+ Year Member

Msg#: 141 posted 10:50 am on Dec 28, 2002 (gmt 0)

I'm a newbie with these "hi-tech" issues, so bear with me;)

I've succeeded in creating a mySQL product database and some dynamic pages that get their info from the d-base. Now the last step to take is to change the dynamic urls to static with a .htaccess/mod_rewrite file.

The dynamic urls look something like this: mydomain.com/titles/title.php?id=9007 . The pages look fine, when called this way.

Then I create this .htaccess file:
RewriteEngine On
RewriteRule ^(.*).*/(.*)/$ title.php?path=$1/$2

When I use this mod_rewrite rule, I only see a blank page with the footer, which by the way is called with a PHP include command. Rest of the PHP stuff cannot be seen at all.

Why does the page behave differently, when mod_rewrite is being used? I'm completely lost! All help is greatly appreciated!



WebmasterWorld Senior Member 10+ Year Member

Msg#: 141 posted 8:42 am on Dec 30, 2002 (gmt 0)

Your RewriteRule will not produce an URI similar to your dynamic URIs. There are a lot of examples of what you want to do to be found on WebmasterWorld and other resources. Have a look at
Introduction to mod_rewrite [webmasterworld.com]
Apache mod_rewrite documentation [httpd.apache.org]
WebmasterWorld Site Search tool [searchengineworld.com]


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved