Good day,
Im having problems redirecting users from fake, user-friendly URLs to real URLs. I'm using mod_rewrite in th .htaccess. The problem is that I want to redirect the user to a Front Controller script that it is outside of the domain where the user is. The structure goes like this:
/ <-- other domain
/dir1
/dir2
Front-controller.php
/mydomain <-- my domain
.htaccess
The code in the .htaccess is the following:
DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine On
Options +FollowSymlinks
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.+)/(.+).htm$ http://otherdomain.com/dir1/dir2/Front-controller.php?url=%{http_host}&cat=$1&page=$2 [L]
</IfModule>
Currently, Im redirected to the front controller with the right parameters, but the user friendly URL isnt maintained. How can I maintain the user friendly URL? or how can I access the script from "mydomian.com"?
thanks in advance
caedo.