RewriteRule (.htaccess) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Other (
https://sampforum.blast.hk/forumdisplay.php?fid=7)
+--- Forum: Everything and Nothing (
https://sampforum.blast.hk/forumdisplay.php?fid=23)
+--- Thread: RewriteRule (.htaccess) (
/showthread.php?tid=604202)
RewriteRule (.htaccess) -
ZaBraNjeNi - 01.04.2016
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.
Re: RewriteRule (.htaccess) -
Ahmad45123 - 01.04.2016
You sure you have the module on ?
And also, Did you set the RewriteBase ?
Re: RewriteRule (.htaccess) -
Sublime - 02.04.2016
not really a genius with apache, but did you change the AllowOverride value from none to all in ur httpd.conf/website zone conf?
Re: RewriteRule (.htaccess) -
BlackBank - 04.04.2016
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
Re: RewriteRule (.htaccess) -
ZaBraNjeNi - 06.04.2016
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