tags:

views:

11

answers:

1

rewrite script in .htaccess

RewriteEngine on

RewriteRule ^index/page/(.*)$ index.php?page=$1

It works in local machine. but in server it does not work. can any body help me?

A: 

Have you verified that the rewrite module is loaded on your server? If the server is running apache you should be able to verify this with

apache2ctl -t -D DUMP_MODULES

and looking for the rewrite_module in the response. (NB: You may need apachectl depending on the machine you are using.)

If it is not loaded you might need to change your server configuration. This is doable (again, depending on the version of apache in use) with a step like

a2enmod rewrite

or ensuring your httpd.conf file contains

LoadModule rewrite_module libexec/apache2/mod_rewrite.so

or by ensuring there's a symbolic link between the rewrite.load file /etc/apache2/mods-enabled and /etc/apache2/mods-available.

Don't forget to restart apache afterwards.

borrible
its loaded and have already tested it. the server is godaddy.
krushna