Forum Moderators: phranque
file httpd_vhosts.conf:
NameVirtualHost #*$!.#*$!.#*$!.1:80
NameVirtualHost #*$!.#*$!.#*$!.2:80
NameVirtualHost #*$!.#*$!.#*$!.3:80<VirtualHost #*$!.#*$!.#*$!.1:80>
LogLevel info
Options FollowSymLinks
AddDefaultCharset utf-8
ServerSignature Off
ServerAdmin root@invalid
ServerName mydomain.com
ServerAlias www.mydomain.com
ServerAlias myotherdomain.com
ServerAlias www.myotherdomain.com
DocumentRoot /path/to/mydomain.com/html
ErrorLog "/path/to/system/logs/mydomain_com_log"
CustomLog "/path/to/mydomain.com/logs/access_log" "combinedio"
DirectoryIndex index.php index.html
php_flag magic_quotes_gpc off
php_flag register_globals off
php_flag register_argc_argv off
php_flag safe_mode off
php_flag short_open_tag off
php_flag session.use_only_cookies on
<Directory /path/to/mydomain.com/html>
RewriteEngine on
RewriteBase /
RewriteRule!\.(js¦ico¦txt¦gif¦jpg¦png¦css)$ index.php
AllowOverride none
Order Deny,Allow
Allow from all
<FilesMatch "(^\.ht¦~$¦\.bak$¦\.BAK$¦\.ini$)">
Order Allow,Deny
Deny from all
Satisfy All
</FilesMatch>
</Directory>
</VirtualHost>
<VirtualHost #*$!.#*$!.#*$!.2:80>...</VirtualHost>
<VirtualHost #*$!.#*$!.#*$!.3:80>...</VirtualHost>
The problem is the rewrite engine doesn't work. Going to [mydomain.com...] Turned on I only get:
Forbidden
You don't have permission to access / on this server.
Turned off, works fine but without rewriting the host.
So the problematic code is:
RewriteEngine on
RewriteBase /
RewriteRule!\.(js¦ico¦txt¦gif¦jpg¦png¦css)$ index.php
What you suggest do do?