mod_rewrite |
dll not needed? |
|
after doing some more research, i figured I don´t need a dll for this... is this correct? mod_rewrite.so would be the right one then... if so, I´m at a loss of how to make it work, could you help me out please. I dont know much about apache config
tia |
||||||||||||
|
Site Admin
|
What you shown above looks correct and should work.
You may want to enabled mod_rewrite's logging and inspect the logged lines to see what's wrong. AFAIK in most cases users tend to write incorrect rules. Try the simpliest ones listed in the docs and see if they work, they try complicated rules etc. Don't forget to restart Apache (or reload its configs) each time you change anything in configuration files. |
||||||||||||
|
|
I've also been having problems with mod_rewrite using the Tech Platform (not sure which version, uses php ver 4.3.4). I have an .htaccess which works on a test site on my Linux production server but not on the same test site on my local Win2000 server. I uncommented all related mod_rewrite statements in apache/conf/httpd.conf and tried my .htaccess, but keep getting a 404 when trying the test url (after stopping/starting apache). I then added the rewrite logging in httpd.conf as you suggested to oliverazevedobarnes with:
RewriteLog logs/rewrite.log RewriteLogLevel 9 On starting apache I get: Syntax error on line 72 of c:/nusphere/apache/conf/httpd.conf: Invalid command 'RewriteLog', perhaps mis-spelled or defined by a module not included in the server configuration The syntax for RewriteLog comes from the apache site (http://httpd.apache.org/docs/2.1/mod/mod_rewrite.html). I don't get any startup errors when mod_rewrite is uncommented, but I do when I add the 'RewriteLog'. What am I doing wrong, and how do I get mod_rewrite working on my local machine? How do I check if my local Tech Platform apache supports mod_rewrite? My .htaccess looks like: Options +FollowSymLinks RewriteEngine on RewriteRule g(.*)\.html$ /go.php?gid=$1 One thing I noticed is that my online phpinfo shows mod_rewrite under the Loaded Modules section in the apache block, but for my local machine there is no Loaded Modules section, and under PHPEd there isn't even an apache block, never mind a Loaded Modules section. How do I figure what's going on with apache in phpinfo in these two local environments? PHPEd is ver 4.0 build 4037 (I presume it uses the same apache as the Tech Platform?). |
||||||||||||
|
Site Admin
|
first of all, if you have Virtual Hosts in your Apache configuration (and TechPlatform installs Virtual hosts by default) you have to turn
RewriteEngine on for each Virtual host you want it to work under: For example, find <VirtualHost....... then add the following line under it RewriteEngine on |
||||||||||||
|
|
Thanks - that worked perfectly. Even the rewrite log is working once I added it to each virtual host section after the "RewriteEngine on" line.
|
||||||||||||
|
|
I rejoiced too soon. It works perfectly with just the tech platform, but no matter what I do I can't get it to work with PhpED debugger - I just get a 404 each time using what I've already tested successfully with the tech platform. I noticed PhpED debugger uses port 8080, so I created an extra virtual host entry in apache.conf for 8080 based on the example for port 80:
<VirtualHost *:8080> # # for mod_rewrite # RewriteEngine on RewriteLog logs/rewrite.log RewriteLogLevel 9 ErrorLog logs/port8080.log CustomLog logs/common-access.log common </VirtualHost> I made sure logging is set on in PhpED's php.ini but regardless, it doesn't write anything to the logs. I searched for another apache.conf, thinking maybe it uses its own apache same as it uses its own php, but found nothing. I know I have to start apache in order to use MySQL, but does PhpED use the tech platform's apache as its webserver, or does it use something else as a webserver? How do I activate mod_rewrite for PhpED debugging? |
||||||||||||
|
mod_rewrite |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by