I have installed apache on centos and configured cpanel/whm.
I have a jsp project which is hosted on the server and also we need to maintain some php files for supporting helpdesk.
jsp project url is http:www.xyz.in:8090/jspproject/index.jsp
php files url is http:www.xyz.in/heldesk/index.html
helpdesk folder and jspproject are placed under public_html i.e. /home/account/publich_html.
The following task is required
When user types url either "http:www.xyz.in" or "http:www.xyz.in:8090" then jspproject should run (http:www.xyz.in/jspproject/index.jsp) and still url must be "http:www.xyz.in/jspproject"
When user types url as "http:www.xyz.in/helpdesk" then helpdesk (php files) should run (http:www.xyn.in/helpdesk/index.html) and url must be "http:www.xyn.in/helpdesk"
.htaccess is placed under /home/account/public_html/
Please advice me how to handle in .htaccess with rewrite rule.
Related
I have several webpages on my root directory (e.g. index.htm, home.php and home_page.php) which all are starting points for different versions of my website.
I ahve upgraded PHP version (as advised by my hosting service) from 5.3 to 5.6. This has put a .htaccess file on my site and now my PHP pages on root won't load and I get a "500 Internal Server Error" message.
The .htaccess file was created by the web hosting provider when the PHP version was updated.
The content of the .htaccess file is AddType application/x-httpd-php56 .php .php5.
If I delete the .htaccess file then my pages work OK as before but I do not know what the implications of deleteing this file are.
How do I log my exception errors?
Any help on how I can getall of my pages to be displayed, please?
I don't have my .htaccess file for my magento installation which is by default present for all the fresh magento installation.
Now I have to remove "index.php" from my wesite url and found out htaccess file needs to be edited. But, there is no .htaccess file in my magento root folder.
Also, I have made a lot of changes to the website and don't want to do a fresh installation to get the .htaccess file.
Also, when I access my admin panel it also needs "index.php" in the URL.
Please, can someone help me with this.
To Remove the inde.php from the URL you need to enable Web Server Rewrites.
You can enable Web Server Rewrites suing below steps:
Login in Backend, from Top Navigation click on System >> Configuration >> Web
Select Use Web Server Rewrites to YES in Search Engines Optimization group.
If you need .htaccess file, you can donwload the compatible magento zip file and can use its .htaccess. There is no need to install magento for this.
I have linux server (Red Hat Enterprise Linux Server release 5.3 (Tikanga)) with apache installed. It is already used for browsing some documents. Now I would like to add a new Directory (with a html page), so whenever the directory is browsed it can display the html page.
But I am not sure of where all to edit the httpd.conf file
Existing httpd.conf:
When I hit the url "http://servername/eng" it displays list of folders.
Now, I want to add a website to this existing, so when user hit the url "http://servername/builds" it should display a html page in the browser.I have added my "index.html" page in location "/var/www/html/builds/"
For this I added the below code to httpd.conf file
Please let me know what all modifications are required in the conf file
You can do it in a few different ways.
Putting index.html in /build
This requires you to have this setting:
DirectoryIndex index.html
(it should be there by default on most platform.)
Also for this to work, rather than putting new <Directory>, you should put the build/ directory in the directory that holds your http://example.com/ files. For instance:
/var/www/example.com/public_html/eng/
/var/www/example.com/public_html/builds/
/var/www/example.com/public_html/builds/index.html
Storing build/ in folder completely unrelated to example.com, but still be able to reach it via example.com/builds
For this, you need to rewrite the URLs so that example.com/builds redirects the user to the final URL. This is most easily achieved through mod_rewrite. You enable mod_rewrite module in your Apache's configuration, make sure that example.com can have .htaccess files through ensuring proper AllowOverride entry in example.com's <Directory> configuration, create /var/www//example.com/public_html/.htaccess (or similar) file, and fill it RewriteEngine On and RewriteRules you need. More on mod_rewrite in the Internet and in the documentation.
Completely separate virtual server, for example builds.example.com/
In this case, what you're looking for are virtual servers. These are not defined in httpd.conf or configuration itself, but usually have dedicated directory.
For example, to add builds.example.com that works for port 80, you'd need to create following entry:
<VirtualHost *:80>
ServerName builds.example.com
DocumentRoot /var/www/builds.example.com/public_html/
</VirtualHost>
Where to put this? Well, it depends on the platform. For Debian, you put this in a new file in /etc/apache2/sites-available/, e.g. /etc/apache2/sites-available/example.com, and symlink to it in /etc/apache2/sites-available (on Debian, you can do this easily with a2ensite <NAME_OF_FILE>. On your platform this procedure might be different, so look it up ("adding virtual servers on " would be a start). After adding virtual servers, you need to reload your Apache configuration.
Please let me know if this satisfies your question, if not, I'll edit the answer accordingly.
I am new to magento, I have worked on VirtueMart for joomla for a year now and I noticed it has no multistore ability until a friend introduced me to magento. I have succesfully installed magento(1.7.0.2) into WAMP 2.2 (PHP v5.3.13) on my Windows7.
I succesfully created root categories just as directed here: http://www.templatemonster.com/help/magento-how-to-set-up-and-manage-multiple-stores.html but in my own case, I am using sub-directories (ie //domain/magento as main store and //domain/magento/crunchies as store2).
A root category was created at the backend for crunchies. I copied both index.php and htaccess from magento folder (c:/wamp/www/magento) to crunchies folder (c:/wamp/www/magento/crunchise).on the crunchies' copy of index.php, $mageFilenam =‘app/Mage.php’; I change it to $mageFilename=‘../app/Mage.php’;
And saved changes, I also open up the copied htaccess file and added the following to the end of it:
SetEnvIf Host.*MainWebsite.*MAGE_RUN_CODE= base";
SetEnvIfHost .*www.crunchies.com.*MAGE_RUN_TYPE="cruncies_code";
Where website names created at System>manage store of backend are: Main Website(for main store) and www.crunchies.com (for store2).
When I point to domain/magento on my browser, it shows home page but when I point to domain/magento/crunchies, I get :\"mydirectery"../app/Mage.php was not found.
Please how do I solve this issue? Is there any other setting I'm missing out in my wamp config?
Is it possible to execute .htaccess file on Tomcat?
We are trying to get phphgadmin to work and so far we can only load the first screen that display some folder links. When we click on them we get a 404 error and we suspect it might be URL rewriting.
You can't run phpmyadmin on tomcat, because tomcat can't interpret php (nor it can interpret .htaccess)
What you need is Apache HTTP server, and if you need to also run Java, use mod_jk or mod_proxy_ajp (comparison) - a way to let apache serve what tomcat "produces".