Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

RewriteRule in XAMPP [htaccess]

Entrepreneur & Investor
Joined
Jun 17, 2008
Messages
377
Reaction score
7
Before I get started I'm going to tell you I went into "apache/conf/httpd.conf" changed the following:

"#LoadModule rewrite_module modules/mod_rewrite.so"
to
"LoadModule rewrite_module modules/mod_rewrite.so"

AND

"AllowOverride None"
to
"AllowOverride All"
(in three different spots)

But it still isn't working.


This is an example of what I'm trying to mod_rewrite in .htaccess
Code:
RewriteRule ^register(|/)$ /register.php
RewriteRule ^register_submit(|/)$ /register.php?doSubmit
RewriteRule ^register_messages(|/)$ /register-messages.php
RewriteRule ^register/cancel(|/)$ /register-cancel.php
RewriteRule ^register/welcome(|/)$ /welcome.php
RewriteRule ^register/undefined(|/)$ /index.php

Thanks,
Chad
 
Junior Spellweaver
Joined
Apr 12, 2006
Messages
121
Reaction score
26
What do you get? 500 error or the URL rewriting doesn't work?

Try two things:

1:
Code:
RewriteEngine On
in your .htaccess, before any rewrite rule.

2:
Code:
^/register
For everything, instead of ^register (/ = webserver root).
 
Entrepreneur & Investor
Joined
Jun 17, 2008
Messages
377
Reaction score
7
What do you get? 500 error or the URL rewriting doesn't work?

Try two things:

1:
Code:
RewriteEngine On
in your .htaccess, before any rewrite rule.

2:
Code:
^/register
For everything, instead of ^register (/ = webserver root).

I get Error 404 Object Not Found!

1) I have that already
2) It's not that it isn't going to the right place because when I click on the Cancel it goes to "http://WEBSITE/directory/register/cancel" (which is correct) but it says error 404. (in the htaccess register/cancel is register-cancel.php and when I go to that page it works fine...
 
Junior Spellweaver
Joined
Apr 12, 2006
Messages
121
Reaction score
26
Something is wrong with your regexp then.

PHP:
^register(|/)$
Since when do we put (|/) for "nothing" or "a slash"?
It should be

PHP:
^register/?$
And same goes for all others.
 
Revolution-Entrepreneur
Joined
Apr 2, 2009
Messages
451
Reaction score
19
O_O, i thought it's way more easier? anyways I'm trying this out.
 
Entrepreneur & Investor
Joined
Jun 17, 2008
Messages
377
Reaction score
7
Something is wrong with your regexp then.

PHP:
^register(|/)$
Since when do we put (|/) for "nothing" or "a slash"?
It should be

PHP:
^register/?$
And same goes for all others.

Well what you said doesn't work... I uploaded it to a web host and other stuff in the .htaccess works but not the ReWrite stuff.
 
Back
Top