E
E
Elon2022-03-10 22:17:56
Apache HTTP Server
Elon, 2022-03-10 22:17:56

Why doesn't mod_rewrite work on apach 2.4?

I downloaded WAMP with Apache version 2.4.51 and there mod_rewrite is already enabled by default, but it still doesn't work for me.

Here is my .htaccess

# BEGIN iLab 
#<IfModule mod_rewrite.c>
# Protect files and directories from prying eyes.
<Files ~ "(\.(inc|module|pl|sh|sql|theme|engine|xtmpl)|Entries|Repositories|Root|scripts|updates)$">
##  Order deny,allow
##  Deny from all
Require all denied
</Files>

# Set charecter set
#AddDefaultCharset UTF-8

# Set some options.
RewriteEngine on
DirectorySlash off
#RewriteEngine off -disabled all following commands
Options -Indexes
Options +FollowSymLinks 

# Customized error messages.
#ErrorDocument 403 /errors/error.php?403
#ErrorDocument 404 /errors/error.php?404
#ErrorDocument 500 /errors/error.php?500
ErrorDocument 404 /index.php
ErrorDocument 403 /index.php
ErrorDocument 500 /index.php

# Override PHP settings in Apache 2 (Apache 1.3 code removed as it is irrelevant here).
# More exist in sites/default/settings.php, but the following cannot be changed at runtime.

#<IfModule sapi_apache2.c>
#  php_value magic_quotes_gpc                0
#  php_value register_globals                0
#  php_value session.auto_start              0
#</IfModule>



#RewriteBase /
#RewriteRule ^.htaccess$ - [F]
#RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [NC, OR] 
#RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro
#RewriteRule ^.*$ - [F]

RewriteRule ^(.*inc.php)$ index.php

RewriteRule ^go(.*)$ index.php?url=$1
RewriteRule ^view(.*)$ view.php?url=$1
RewriteRule ^pic/(.*).jpg(.*)$ il-image.php?id=$1$2

#WebMail Login
#RewriteRule ^webmail(.*)$ http://www.ipower.com/mail/index.bml?m=1

#RewriteRule ^upload(.*)$ upload

#</IfModule>
# END iLab

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question