I have a cakephp app inside a folder online like this: https://www.example.com/main
however, when I enter there, I want my url to show like this: https://www.example.com
I already tried modifying core.php
Configure::write('App.baseUrl', '/');
And it shows what I want but returns "The requested URL /info/inicio was not found on this server."
I know that the solution would be to just remove the folder "main" and load the cakephp app directly, but at the moment that's not possible.
I solved it by going to my cpanel and setting https://www.example.com/main as the pointer and then created a new domain that points to https://www.example.com/admin
Easy
Related
Right now the sites are accessible through the virtual directory named node as said in the docs.
Is there a way to change its name? Or even remove it completely from the URL?
Instead of:
http://localhost/node/express/myapp/demo
I would like to have:
http://localhost/express/myapp/demo
Or ideally:
http://localhost/demo
This last case is how the url looks when using node as a server.
Look at your default website, in IIS, you should see that it added node as a virtual application. you should be able to remove it from there and reconfigure as desired. Just make sure to review the rewrite rules/configuration in the web.config file for the /node/ folder.
I want to copy my website (Orchard 1.7.2.0) to localhost, to test some things before I do that on the live site.
Ik copied the database and de web directory and configured iis. In the orchards database I changed the base url in the Settings_SiteSettings2PartRecord table. I also changed the database connection in settings.txt
Now when I enter the new base url in the browser I get redirected to the original url. How can I prevent this? I can't find any other reference to the original url.
Thanks in advance for your answer.
I found out what went wrong.
There was a rewrite in the database to the originial url (for removing www in the url). I removed that and now it works.
I have been searching and looking for the answer to this for SO long now without any joy, I hope someone can help.
Okay I have a web structure of:
Main folder - This is where you first land prior to logging in. After you log in you will be either directed to a number of websites that are resident in a sub-folder called websites. The problem I have is that I would like the document root, say the $_SERVER['DOCUMENT_ROOT'] variable, to default to the root of the website folder that it has been directed to. You see I have a lot of $_SERVER['DOCUMENT_ROOT'] in my php code and I use the '/' slash a lot in the href on my HTML tags.
I have seen that I could accomplish this by adding a .htaccess in the root of eiach website folder but 1, would like work for my situation and 2, could anyone please help me with the code. I understand I can use the RewriteRule command but I can't get my head around it. My folder stricture is like this:
login (index.html)
websites folder
website1 (index.html)
website2 (index.html)
website3 (index.html)
I have tried many versions of using RewriteCond etc but non of them work.
If anyone can help me out here I'd be very grateful.
Thanks
Nothing you can do in your htaccess file that's going to be able to change the document root. One thing that you can do is create separate domains that you can make their document roots point to each of the websites folders. Then proxy to one of those domains.
That way the URL on the browser doesn't change domain names, and internally, you're proxying requests back to yourself and the individual website domains will each have their own document root.
I have developed a website www.mywebsite.com and it is ready to go live.
I have used Codeigniter framework.
When I enter www.mywebsite.com from any android/iphone, it redirects automatically to mobile.mywebsite.com and displays page not found error. I dont have any mobile site developed for this. I want to show the main site even on the smartphones.
I am not good at .htaccess file, and I am using default .htaccess to remove the index.php in the url.
I tried creating a subdomain mobile.mywebsite.com and pointed to root path. But same response. I search online, but didnt find anything on how to STOP redirecting.
Thanks in advance.
When I was uploading my local files into the server I was NOT overwriting the old ones assuming the folder is clean and no need to overwrite. But my hosting provider has default .htaccess which is redirecting to the mobile site.
I deleted the old one and gave my .htaccess without the mobile redirection and everything is in place now
Hello MODx developers,
I am using MODx revolution. I have just transferred site from one domain to another. as it was a IP based server i have created virtual host with the same name it had previously.
On previous server the files were located at the root but in new server files are located at tab3, so i have created virtual host that points inside that directory. ie. I have all files in modx/ dir so my virtual host config set to /var/www/modx/
Now the problem is whenever i open home page as well as subdomains (contexts) it works and shows the page but when i open any internal links it says 404 page
Ex : if i open www.abc.com => It works
but when i open www.abc.com/contacts => It doesnt works
I see its issue with .htaccess because
1) if i remove htaccess
all the subdomains and domains works perfect but inner links like "abc.com/contact" doesnt open up and says 404
2) If i add it again only the main domain and its inner links open...no subdomain or inner links of subdomain works
One more thing....and CLUE is that
when i try to access the same 404 page with ID like this
www.abc.com/index.php?id=8056
It works
DO i need to add/remove something from htaccess ??
Is the new server running Apache? I had a similar problem where the server was running Zeus & therefore .htaccess didnt work. There is a solution but was too advanced for me. Was easier to install on an Apache server instead.