Welcome to WebmasterWorld Guest from 54.204.162.36

Forum Moderators: Ocean10000 & incrediBILL & phranque

PHP and mod_rewrite problem!

   

zeb

10:50 am on Dec 28, 2002 (gmt 0)

10+ Year Member



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!

8:42 am on Dec 30, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



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]

Andreas

 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month