RewriteRule (.htaccess)
#1

Hi,

I've some problems with RewriteRule. Site can't load my page(in this case, "register" page). If I click at the button I get error 404.... But if I use something like this: test.com/index.php?page=registracija that works fine....
.htaccess file:
Код:
RewriteEngine on

RewriteRule ^registracija$		"index.php?page=registracija"
RewriteRule ^login$						"index.php?page=login"


<Files 403.shtml>
order allow,deny
allow from all
</Files>
deny from 5.149.69.140
href:
Код:
<a href="/registracija"><?php echo $lang['nav_register']; ?></a>
Thanks.
Reply
#2

You sure you have the module on ?

And also, Did you set the RewriteBase ?
Reply
#3

not really a genius with apache, but did you change the AllowOverride value from none to all in ur httpd.conf/website zone conf?
Reply
#4

Already tried with [L,NC] behind those RewriteRules? I thought it was also required, but i'm not sure.

Example what i mean (also works on my vagrant/vm box, so tested):
Код:
RewriteEngine On

RewriteRule ^registracija$		"index.php?page=registracija" [L,NC]
RewriteRule ^login$			"index.php?page=login" [L,NC]

<Files 403.shtml>
order allow,deny
allow from all
</Files>
deny from 5.149.69.140
Reply
#5

Thank you all.
I was fixed it by deleting quotes...
Код:
RewriteEngine on

RewriteRule ^registracija$		/index.php?page=registracija
RewriteRule ^login$						/index.php?page=login


<Files 403.shtml>
order allow,deny
allow from all
</Files>
deny from 5.149.69.140
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)