Good morning experts,
I developed a website on my local machine und put it in a folder called "restart". Now I uploaded the whole thing for live production. I used mod_rewrite to hide the folder "restart" by this:
RewriteCond %{HTTP_HOST} mydomain\.de$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^/blog
RewriteRule ^(.*?)$ /restart/$1 [QSA,L]
So far, that works well as my page is displayed directly when I call
"mydomain(dot)de/blog/"
instead of
"mydomain(dot)de/restart/blog/"
.
Unfortunately the UrlManager is not able to resolve the route. I always got the index page displayed, or with strict parsing enabled an error. It seems to me, that Yii cannot resolve the route since it is missing the subfolder "restart".
I tried several thing that all had not been working so far:
- Trying to define absolute rules - not helping:
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false,
'useStrictParsing'=>false,
'rules'=>array(
'http:...mydomain.de/blog/'=>'blog/default/index',
'http:...mydomain.de/blog/<category:[-a-z]+>/'=>'blog/default/category'
),
),
-
Trying to set basePath in the config file manually to the Path without the subfolder - not working
-
Trying to mod_rewrite directly to the "restart/index.php" instead to the folder "restart" - same story
Any clues?
Best Regards and many thanks in advance!
Tristan
P.S. I had to change the URLs a bit since it is not allowed to use URLs within the first posts. But it should be clear what is meant