Forum Moderators: phranque

Message Too Old, No Replies

mod rewrite not working in easyphp3

mod_rewrite not working in easyphp3

         

patd

1:19 pm on Mar 6, 2009 (gmt 0)

10+ Year Member



Hi,

I use easyphp3 on windows xp.

I have enable more_rewrite on httpd.conf
but still its not working.

I have tested form phpinfo() that the mod_rewrite module is loaded, but its not working.

I have gone through many methods that have suggested all over the net, still no success.

any help?

jdMorgan

2:42 pm on Mar 6, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How are you testing? Do you have a simple RewriteRule you are using to test? If so, please post it.

Are you trying to use mod_rewrite directives in httpd.conf, in conf.d, or in .htaccess? On Windows, you must change the name of the .htaccess file to something else, and declare the new name using AccessFileName in httpd.conf or similar server config file (See [httpd.apache.org...]

Did you enable mod_rewrite with the required Options +FollowSymLinks (or Options SymLinksIfOwnerMatch), and RewriteEngine on directives?

"Not working" doesn't tell us enough to help. How did you test and what were your test results, specifically?

Jim

patd

4:52 am on Mar 7, 2009 (gmt 0)

10+ Year Member



Below is the php file code
<?php
//test.php
$p = $_GET['page'];
$q = $_GET['var'];

switch($p) {
case 'page1':
// if $p = page1 i.e url was something like test.php?page=page1
switch($q) {
case 'boo':
//if $p=boo then url is somehting like test.php?page=page1&var=boo
echo "<h2>This is page1 And BOO</h2><br />";
break;
case 'foo':
echo "<h2>This is page1 And FOO</h2><br />";
break;
default:
// if $p = page1 i.e url was something like test.php?page=page1
echo "<h2>This is page1</h2>";
break;
}
break;
case 'page2':
// if $p = page2 i.e url was something like test.php?page=page2
echo "<h2>This is page2</h2>";
break;
case 'page3':
// if $p = page3 i.e url was something like test.php?page=page3
echo "<h2>This is page3</h2>";
break;
case 'page4':
// if $p = page4 i.e url was something like test.php?page=page4
echo "<h2>This is page4</h2>";
break;
default:
// if page != any of the above, then default is executed
echo "<h2>This is the Default Page</h2>";
break;
}
?>

and here is the .htaccess code
RewriteEngine On
RewriteRule ([^/]+)/(.*)\.html$ test.php?page=$1&var=$2 [L]
RewriteRule ^(.*)\.html$ test.php?page=$1 [L]

===
I can call the test.php page
normally with test.php?page=page1
or just page1.html

but its not working with easy php3,
however its working fine when I upload it to my online linux server.

jdMorgan

8:10 pm on Mar 8, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There are several questions above for which you provided no answer...

Jim

patd

6:28 am on Mar 9, 2009 (gmt 0)

10+ Year Member



I have installed xampp, and mod_rewrite is working when are files are inside htdocs, but its not working when I create an alies.

g1smd

8:32 pm on Mar 9, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



See post 3864269 for several questions that do need answers.