I'm trying to use .htaccess
file to change and clean URLs.
My test site is on xampp
server and I configured this using virtualHost
.
This is my Virtual Host setting:
httpd
Alias /MySite "C:/xampp/htdocs/MySite"
<Directory "C:/xampp/htdocs/MySite">
Options All
AllowOverride All
Order allow,deny
Allow from all
</Directory>
vhost
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin myMail@gmail.com
DocumentRoot "C:/xampp/htdocs/MySite"
ServerName MySite
ErrorLog "logs/MySiteErrorLog.log"
CustomLog "logs/MySiteCustomLog.log" common
</VirtualHost>
When I use very simple commands in .htaccess
file, there's no affect on URL but if I try some wrong code, I will get Error 500.
Would you help me to understand why is that?
Is there any thing wrong in my settings?
UPDATE :
It's my site structure :
MySiteRoot
|
|
PHP //directory
|
Assets //directory
classes //directory
pages //directory
parts //directory
.htaccess //file
index.php //file
This a simple test in .htaccess
file :
RewriteEngine On
RewriteRule ^([^/]*)/$ /mySite/PHP/index.php?page=$1 [L]
These images will describe better:
In both situations the url is the same and there's not error or something
Thanks in Advance...