rewrite .htaccess

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
pedroz
Forum Commoner
Posts: 99
Joined: Thu Nov 03, 2005 6:21 am

rewrite .htaccess

Post by pedroz »

Hello all,


I have the following scenario...
domain.com with .htaccess file in root and 2 folders:
/.htaccess
/portal/
/support/

1. I would like to type http://www.domain.com
and open directly http://www.domain.com/portal/

RewriteRule ^/$ /portal/ [R]
not working, does anyone know why?


2. When click the link http://www.domain.com/portal/support/index.php?a=1
would like to rewrite to http://www.domain.com/support/index.php?a=1

RewriteCond %{QUERY_STRING} foo=(.*)
RewriteRule ^/portal/support/index.php?(.*) /support/index.php?%1
not working...



~note
i am getting this error:
[Wed Dec 30 01:37:31 2009] [error] [client 127.0.0.1] client denied by server configuration: C:/www/~domain/.htaccess

<VirtualHost *:80>
(...)
<Directory "C:/www/~domain/">
AllowOverride All
Options Indexes FollowSymLinks ExecCGI
Order allow,deny
Allow from all
</Directory>
</VirtualHost>



may be it is too late now, but i'm blocked with this...

thank you!
Post Reply