WAMP Server can not direct to the home page - php

Recently I installed wamp server to set up a server environment in a Windows machine. Everything works great, but I have a little problem.
If I am working on a project named test, I can access the project by going to http://localhost/test.
When I create a link to go to the root(test): Go to the root test, I am directed to http://localhost instead of http://localhost/test.
Is there any way for me to solve this problem ?
Thank you for providing your help.

Perhaps I'm oversimplifying, but the root is just localhost and a link specified as href="/" will always take you there. To link to the localhost/test directory, which is not your root directory it's href="/test"

Related

Xampp Settings for localhost

I cant see my xampp settings: using this URL http://localhost/xampp/
This is the result im looking for:
I dont know why but if i look at examples, everyone's URL looks like http://localhost/xampp/ if i use this Url i get a page saying:
Object not found! The requested URL was not found on this server.
The directory is located in C:\xampp, and if i just add http://localhost/ as domain i get the tree structure of everything within C:\xampp\htdocs.
Also using Xampp v3.2.2 , if im in control panel and click on the Apache Config tab it open my file structure as mentioned above everything within C:\xampp\htdocs.
I just want to mention im using Windows, not Mac, but i meen both windows and mac has these Apache settings afcourse, i just dont get it how i cant find it using http://localhost/xampp/.
Apache & MySQL is switched on.
What i think could be the problem:
Could it be that im missing the /xampp directory within the /htdocs directory ?
Im not sure if there should be a xampp directory in htdocs but its the
only thing that makes sense?
Possible reason: Something is running with port 80
when you run Xampp, check the apache port no. ex: if it is displaying port 8012
then your url is http://localhost:8012/dashboard/
Check Directories for Xampp
Xampp directories.
more about this topic
For check all dependencies in the : httpd-xampp
The only reason i see is the xampp file should be located in the htdocs folder at least that is how i have it.
However i do not think that this will cause a problem for you in developing anything.
Hope this was helpful :)

WAMP does not open my project

I am completely new to web-dev and wamp, I have to use it for a college project to build a website using php. I installed the newest version of wamp. I cloned my project repository into the www folder.
When I run "localhost" in the browser, I get the generic wamp page and I can see my project folder on the bottom of the page under the "Projects" heading
when I click on the project it does not open and I get a 404 not found error. This is not the same issue a thousands other people have written about, where when they uses the path "localhost/projectname" they get access to their project but when they just click their project the path is "projectname" and they dont see their project. I have read tons of posts with people that have that problem and I do not think I have the same issue becase when I click on my project link on the wamp hompage, I get the complete path "http://localhost/PaperCloudBackend/" and this shows a 404 error
Keep in mind that all I have done with wamp so far is:
1) install it
2) clone repo into www folder
3) opened browser with localhost
4) clicked on my project name
I would really like a concise answer to why this is happening so I can learn the root cause, and also a solution to the problem because i have not contributed to my team codebase at all and I have not been able to solve this issue after 1 week.
Thanks
I assume that its an .htaccess error which is clashing . If you have .htaccess in your project then check it if you have given the correct url in the .htaccess rule or you can delete the file(.htaccess) and run the project in your browser.
Another problem that you should check is there any index file is present in the root of the folder you are trying to access.
I hope this might help you.
Currently thats also happed with me on window8.1, To prevent this open the index.php file from root directory wamp/www/index.php.
Change
$suppress_localhost = true;
To
$suppress_localhost = false;
Hope this will help you to fix the problem.
Please make sure that index file exist in your "PaperCloudBackend" directory as it is the entry point of execution.

Netbeans PHP - I can't see my web server

I have a wordpress website on my WAMP server, which I made as a project in Netbeans IDE. Everything was working fine untill I changed the name of my PHP project from 'stickpeg' to 'portfolio'. Now when I try to run my project by clicking the green arrow on the menu tab, it displays me a page saying...
Not Found
The requested URL /wordpress/ was not found on this server.
Apache/2.4.9 (Win64) PHP/5.5.12 Server at localhost Port 80
I'm thinking that the error is something to do with my NetBeansProjects folder, as it's not in my wamp folder at all, but in my documents folder! Plus, the project folder in the NetBeansProjects folder is called 'portfolio', which has 3 other folders inside it called config, public_html and test, which are all empty.
Please help, I just want to be able to see my wordpress website running in my browser again.
You have to put the files in the htdocs directory. Apache (e.g. your WAMP server) can't find the files, since there are in the My Documents folder.
Just move the directory wordpress to C:\wamp\htdocs\wordpress (for example).
Never mind. Sorted it out. Apparently I had to change the Site Address URL and WordPress Address (URL) and then go into netbean's project properties -> run configuration and change the project url.

WAMP doesn't update html file after editing

i have another question. I am using WAMP as my local server. I have this file index.htm. The problem now is when I try to edit this file and reload localhost in the browser nothing' changed. But when i double click the html file to open it without WAMP server it diplays the edited one. I don't know why..
it's working now. I only have to put all files inside WWW folder and not inside another folder. Thanks everybody for the help..
Check that the index.htm is in the correct (WAMP) directory (usually c:\wamp\www)
Check WAMP is running
Personally i use XAMPP for mac (they have a windows version too) and place your Websites in /Applications/XAMPP/htdocs/ and access them via (http://localhost/) or you put your Websites in the Sites-Folder in your Home and access them via (http://localhost/~username/).
Obviously if you use windows the paths will be different, but XAMPP will provide you with a help screen on first boot.

CodeIgniter fresh copy works over LAN, but gets 403 over WAN

I'm starting a new CodeIgniter project, so I grabbed a fresh copy of version 2.1, and unarchived it to my local Apache root. I set up config.php and tested the site from localhost and another machine via the computer's LAN IP, and it worked as expected.
I also have my router forward WAN port 443 to port 80 on my server machine, so that I can access my Apache server from school (via wan_ip:443). This usually works fine, but when I try access my new CodeIgniter copy, I get a 403 Forbidden page.
I can still access all other sub-folders on my Apache server via WAN, including other, older, CodeIgniter projects.
There is no .htaccess file in the root of the fresh copy. I tried chmod-ing 755 and 777 recursively, but with no change.
Anybody have any idea what could be causing this? I've done quite a few CodeIgniter projects, and I've never had this issue.
I would have a look at the apache config maybe there is something related to the ip.
Also check your codeigniter config. Maybe it is doing some routing.
Try to replace your project with a simple index.html if that works apache is fine.
Check if your project itself does some redirect or something like this...
Turns out it was an Apache issue. I created an .htaccess file and added "Allow from all" to it, and now it works. I'm not sure why I needed to do that since I could access all my other Apache directories over WAN just fine, but it worked.

Categories