Hi, I am using webserv and i can't seem to make mod rewrite work. I have uncommented the module in Php.ini but it still don't seems to work.
Any help will be appreciated.
Thanks and regards ac_sandeep@hotmail.com
what about in httpd.conf \webserv\apache2\conf
sorry about that. When i said php.ini i meant httpd.conf.
Earlier i had phpdev and it worked fine. Now i have installed webserv but now mod-rewrite is not working :-(
Regards
make sure all the files from phpdev are removed from the windows directory
what error do you get when you run apache -t from the cmd line in the webserv\apache2\bin dir ?
hi,
i deleted all the files/services created by phpdev. And when i ran apache -t it said "Syntax OK".
However when i run phpinfo it says mod_rewrite is loaded.
Any ideas??
Thanks and regards sandeep
what exactly isnt working?
hi thanks for your replies.
I am testing mod rewrite on my webserv but aparently it throws a error saying object not found.
here are the rules i am using:
<IfModule mod_rewrite.c> RewriteEngine on
RewriteRule ^hardware/(.*)/(.*)/(.*)/(.*) /index.php?prod_id=$2&meta=$3&cat_id=$1&${page=$4}
RewriteRule ^hardware/(.*)/ /index.php?cat_id=$1 RewriteRule ^hardware/(.*) /index.php?cat_id=$1
RewriteRule ^site/(.*)/(.*)/ /page.php?ptype=$2&action=$1 RewriteRule ^retailers/ /retailers.php?action=retailers RewriteRule ^news/(.*)/ /index.php?news_id=$1&action=news RewriteRule ^search/ /search.php?action=search RewriteRule ^best/ /search.php?best=1&str=andcp.best=1&action=best
RewriteRule ^info/(.*)/ /index.php?ret_id=$1 RewriteRule ^rate/(.*)/ /rate.php?ret_id=$1
RewriteRule ^join/ /join.php
</IfModule>
This was working in phpdev but not in webserv :-(
Reagards sandeep
most likly your in need of a nother module besides mod_rewrite
Thanks all of you for your help. I have finally got mod_rewrite working. I had to changes a few lines in the httpd.conf file to get it working.
AccessFileName .htaccess Allow from all
<Directory /> Options FollowSymLinks AllowOverride All order allow,deny allow from all </Directory>
Thats it.
Regards sandeep
Hi,
thanks to all of you who replied. I have got it working now. I had to change a few lines in the httpd.conf file to get it working
Hope this helps someone
Log in to post a comment.
Hi,
I am using webserv and i can't seem to make mod rewrite work. I have uncommented the module in Php.ini but it still don't seems to work.
Any help will be appreciated.
Thanks and regards
ac_sandeep@hotmail.com
what about in httpd.conf
\webserv\apache2\conf
sorry about that. When i said php.ini i meant httpd.conf.
Earlier i had phpdev and it worked fine. Now i have installed webserv but now mod-rewrite is not working :-(
Regards
make sure all the files from phpdev are removed from the windows directory
what error do you get when you run apache -t
from the cmd line in the webserv\apache2\bin dir ?
hi,
i deleted all the files/services created by phpdev. And when i ran apache -t it said "Syntax OK".
However when i run phpinfo it says mod_rewrite is loaded.
Any ideas??
Thanks and regards
sandeep
what exactly isnt working?
hi thanks for your replies.
I am testing mod rewrite on my webserv but aparently it throws a error saying object not found.
here are the rules i am using:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^hardware/(.*)/(.*)/(.*)/(.*) /index.php?prod_id=$2&meta=$3&cat_id=$1&${page=$4}
RewriteRule ^hardware/(.*)/ /index.php?cat_id=$1
RewriteRule ^hardware/(.*) /index.php?cat_id=$1
RewriteRule ^site/(.*)/(.*)/ /page.php?ptype=$2&action=$1
RewriteRule ^retailers/ /retailers.php?action=retailers
RewriteRule ^news/(.*)/ /index.php?news_id=$1&action=news
RewriteRule ^search/ /search.php?action=search
RewriteRule ^best/ /search.php?best=1&str=andcp.best=1&action=best
RewriteRule ^info/(.*)/ /index.php?ret_id=$1
RewriteRule ^rate/(.*)/ /rate.php?ret_id=$1
RewriteRule ^join/ /join.php
</IfModule>
This was working in phpdev but not in webserv :-(
Reagards
sandeep
most likly your in need of a nother module besides mod_rewrite
hi,
Thanks all of you for your help. I have finally got mod_rewrite working. I had to changes a few lines in the httpd.conf file to get it working.
AccessFileName .htaccess
Allow from all
<Directory />
Options FollowSymLinks
AllowOverride All
order allow,deny
allow from all
</Directory>
Thats it.
Regards
sandeep
Hi,
thanks to all of you who replied. I have got it working now. I had to change a few lines in the httpd.conf file to get it working
<Directory />
Options FollowSymLinks
AllowOverride All
order allow,deny
allow from all
</Directory>
AccessFileName .htaccess
Allow from all
Hope this helps someone
Regards
sandeep