I want to run Zend site under an alias on WAMP. I am able to setup alias, but when I copy a working Zend site there and modify .htaccess to include "RewriteBase /alias", it still does not work. Error messages tell me that controller not found. Mainly this is what happen:
I have: server.com/alias
With Zend file structure inside (application, public, etc).
alias points to c:/wamp/apps/alias
Where Zend structure is stored.
.htaccess has line: RewriteBase /alias
As I understand server.com/alias should act as root folder, but it's not. If I run Zend site under root folder everything works fine then.
Can you tell me how to properly set up alias to run Zend site on WAMP? Thank you.
I think the problem is that your rewrite rules doesn't work well. take a look at this.
Related
Im currently trying to move a website to production that has been designed using contao. The website has been developed in a subdirectory of the current website. Now when I change the DocumentRoot to the contao directory the application automatically forwards me to the /development directory which in that situation does not exist anymore.
I did a database dump and searched it for "/development" to find the variable that is storing this information but I didn't find a match. I then did the same with the configuration files but it didn't show up any results too. How is redirecting handeled in contao?
It sounds like your pathconfig.php is wrong. After deploying/moving a Contao installation, you should always execute and log into the Install Tool under contao/install.php. This will correct your pathconfig.php.
Also make sure the RewriteBase in the .htaccess is set to the correct value (probably / in your case).
I'm using xampp and tried to put my yii folder and the webapp folder separate from the htdocs directory. I've followed the instructions from here:
http://el.web.id/how-to-add-virtual-directory-alias-on-apache-xampp-165
I was able to run the main page all right, but the other pages just return a not found status. May I know how to fix this? I'm not even sure if the main problem comes from Apache or from Yii. Thanks a lot.
Oh, I get it now. We'd just need to add a rewritebase on the .htaccess file that matches the alias.
RewriteBase /aliasfolder
This is for reference purposes.
I have such a problem:
In a local network I have a server which is called by its server_ip.
I have few sites located under /www/site_folder where index.php is located.
So whenever http://server_ip/site_folder is called index.php is called and selected site loads.
Now I put in /www/zend_site a Zend project.
It means two things:
1. index.php is located under /www/zend_site/public,
2. Zend requires rewriting rules set up so framework can understand controller/action extracted from an URL.
What I want, and can't succeed, is to have ability to call Zend project by typing http://server_ip/zend, and also to have rest of my simple sites working by calling them by http://server_ip/site_folder.
I got familiar with configuration for a Zend http://files.zend.com/help/previous-version/Zend-Server-5-Community-Edition/configuring_zend_framework.htm and tried to make use of virtual hosts by introducing new one called zend.
I see it's not possible to get such two existing options running. If zend is in virtual host and if I call only sever_ip it loads zend project instead of /www/index.php (a dummy site). If I remove virtual host after I call http://server_ip/zend it loads /www/zend/index.php instead of /www/zend/public/index.php and also site doesn't work (after I created symbolic link to proper index.php), because links are not correctly rewritten with controller/action extraction.
Or maybe I am thinking wrong about VirtualHosts idea? In server_ip/something <- something is not a domain which could be used in VirualHost in this case?....
Any idea if my configuration could work?
Regards
Because of weird security policies of my hosting provider I have to define my rewrite rules in /etc/apache2/conf.d/examplesite.conf instead of writing them on an .htaccess on the www folder of that site.
What I'm trying to do is setup a Wordpress Mu server (http://mu.wordpress.org/forums/topic/17349 ) and so far its working on a 50%.
The main blog loads perfectly but other sub blogs (located for example at www.example.com/blog2 ) don't.
I'm guessing the problem is that the rewrite rules behave differently when declared at .conf files for each virtual host instead of using .htaccess files.
Has anybody else had this problem? How can you fix it?
This doesn't sound like a rewrite problem to me but maybe it is. You don't say what the error is when you try to load one of the sub blogs. Perhaps posting up what your rewrite rule is would be helpful. Also would you be able to set up a scenario where you did them in .htaccess files on a localhost or something and seeing if there was a difference?
If pretty permalinks work, then mod_rewrite is enabled, and rewriting URLs to WordPress successfully.
If this is the case, then it's a problem with your MU install.
Did you choose paths over sub-domains during the MU install? If you didn't, but then later switched, that's where the problem is - are you in a position to fresh install?
I have recently reinstalled MacOSX, and at some point (without realizing it) I made it so that a directory without index.html would try instead to run index.php. This has since stopped working. My localhost runs .php files fine; it just doesn't do so unless you specifically tell it to.
There are lots of htaccess guides online but I can't actually find one that tells me how to solve this problem :s
I believe it's the "DirectoryIndex index.php" directive in .htaccess that will do the trick.