user1403850
user1403850

Reputation: 11

.htaccess is working fine on localhost but not on server?

This is pretty fine working on local server. But when upload on server this is not working.

RewriteRule ^activate_account/([a-zA-Z0-9]+)\.html$ activate_account.php?activation_code=$1

Page working but passed argument doesn't get. Live Demo.

Upvotes: 1

Views: 772

Answers (2)

anubhava
anubhava

Reputation: 784958

Enable mod_rewrite and .htaccess through httpd.conf and then put this updated code in your .htaccess under DOCUMENT_ROOT directory:

Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /

RewriteRule ^activate_account/([^.]+)\.html$ activate_account.php?activation_code=$1 [L,QSA,NC]

Upvotes: 2

rekire
rekire

Reputation: 47945

  1. Check at first if AllowOverride is active for your hosting solution.
  2. The next step is to check that the ModRewrite module is active.
  3. You need the statement RewriteEngine on which should be active if that works on localhost

Upvotes: 1

Related Questions