I have copied a project from a server to my local machine.
The site appears to be using url rewriting, so I have turned on rewriting_module in WAMP/Apache.
However, there is no .htaccess file in the project. Cannot figure out how the url rewritting is being achieved and so I can't make it work on my local machine.
Make sure your FTP client show hidden files
If not, configure the client so it displays hidden files —refer to your FTP client documentation— and then copy it to your local machine
If it already does or if you have copied the project with SSH, take a look at the remote apache configuration files (I'd look at virtual hosts) and compare with your local configuration.
This is an example of how to configure CyberDuck FTP client :
.htaccess file is hidden file, make your folder view option to show hidden files.
OR
Is the project done in any frame work, that is codeigniter, zend or cake etc, in that case it will be having its own url structure in codeigniter url will be like this : http://domain.com/controller/function
Related
I have a local version of Windows php to test my webpage. I run it using php.exe. It has a built-in webserver so pages can be accessed from a browser through localhost:/path.
If I enter an URL pointing to a file it opens that file in browser. I would like to configure it so that it shows the content of a directory if URL points to a directory. E.g. after inserting URL http://localhost:1234/foo/bar/ into the browser I would want to see the files in the bar directory listed in the browser. Similarly how other webservers do it when configured so.
My local PHP returns 404 instead.
Is there any way how to achieve that for this built-in webserver in php.exe? How?
The built-in server is specifically for quick development and debugging as stated in the command line server doc and directory listing is one of the features is lacks. This answer provides an example for building yours though.
I am trying to upload my new website (codeigniter project) to the server. .htaccess file is used in my project and it is working properly in localhost. Also, i can upload the file too, but after uploading, it is not working. I always need to add the 'index.php' in url. I can't see the .htaccess file and when i trying to upload it again, it is showing the message, the file is alredy exist. Do anyone know the reason?
Try using FileZilla and enable hidden files to be visible:
Open FileZilla FTP client.
From the Menu bar choose Server
Select Force Showing Hidden Files which should be the last option.
One other thing to check is if you're using Apache or Nginx because Nginx does not support the .htaccess file
I am using winSCP(FTP software) to upload my .htaccess. As you mentioned you are not able to view it. However when you try to create a new file through winScp, the file will be automatically loaded to your text editor.
I am not sure if other FTP software works the same.
The file exists, but is hidden.
Probably the user on whose log does not have permission to replace him.
remove .htaccess file from your server , but before make sure that that file is no more useful for you .
other way
open the hosting server .htaccess file in online editor of cpanel
now copy past your htaccess file codes which required to be change.
As mentioned in the comments, it could be that the server is running for example Nginx instead of Apache.
However, I think the most likely cause for the .htaccess file not having an effect is a configuration issue. It could be that .htaccess functionality is disabled either in config you can manage, or in the server's config.
Contact your webhost to resolve this issue.
I am trying to setup a PHP server so that I could use the "Live" feature in Dreamweaver, in addition to being able to preview in my browser without having to upload the .php file via an FTP application every time, which is not efficient when I want to do quick small previews.
I have setup a new website and selected a folder for the site on my local drive.
For the server, I have the following information (I don't know how much of it is relevant):
Remote: Yes
Test: Yes
Server Name: Server
Connect using: FTP
FTP Address: my domain name
Username: my username
Password: my password
Port: 21
Root directory: blank
Use passive FTP: Yes
Use IPV6 Transfer Mode: No
Use proxy: No
Use FTP performance optimization: Yes
Maintain Synchronization Information: Yes
Automatically upload files to server on save: Yes
Enable file checkout: No
Server model: PHP MySQL
When I test the server, it is successful and I am able to get the site/server to show up in "Manage Sites". However, when I want to test my .php file on the "Live" preview panel or as a preview in Chrome, I get the error message: "Dynamically-related files could not be resolved because the site definition is not correct for this server." When I upload the .php file to my FTP manually, the page displays properly but when I try doing this it either does not work or the Chrome preview mode just spits out the entire raw code.
I tried and Googled, but I could not find a solution to this problem. Any help would be greatly appreciated.
Side note: I have my hosting from GoDaddy and the server from there is based on MySQL.
Thank you.
To set up PHP server with dreamweaver follow the following steps
Step 1.
Make Sure you have MAMA(For MAC OX) or WAMP (Window OS) install. If you dont know where to get then click this link
http://www.mamp.info/en/downloads/ and install in you system. (make sure if you are using skype close it because skype and mamp use same port. Later you can chage the port for Skype)
Step 2:
Open Dreamweaver and choose
Site > New Site
Step 3:
Type your site name and click on browse button to locate you htdocs folder (which is normally inside you mamp/wamp folder on you root directory).
Step 4:
Select Server from left hand side and click on add (+) sign.
Follow the following:
Server Name: localhost
Connect Using: Local/Network
Server Folder: (this is wehre your site located (i.e. inside htdocs folder)
Web URL: http://localhost/yourSiteName (yourSiteName is name of your folder)
Click Save.
Step 5:
Check Testing and click SAVE
Step 6:
Last but not least Open File Panel
Window > Files
Now create a new file and Save it inside you folder.
Thats it you are set mate.
hope thats helps
Cheers!
The problem is when you try and run your PHP file from your local machine, there's no web server running - nothing on your machine knows what to do with that file.
The solution is to run a local version of Apache, PHP, MySQL on your local machine - the easiest way to do is to download xaamp - http://www.apachefriends.org/en/xampp.html. Put your website files in the htdocs directory once it's installed, and you can view them by going to http://localhost/websitefoldername
I have transferred my project from one server to new server.
index.php/component/mylist/?ctrl=list&action=catalog&Itemid=573&manufacturer=101291
This url is working only in old server but not in new server.
I used this url instead of above url for new server
index.php?option=com_mylist&ctrl=list&action=catalog&Itemid=573&manufacturer=101291
Is working fine in new server
Can we work this url in new server
index.php/component/mylist/?ctrl=list&action=catalog&Itemid=573&manufacturer=101291
Try copying the .htaccess file from the old server within root of the installation. Also, make sure the Global Configuration settings are identical.
Edit
The easiest way to transfer a Joomla site to a new server is to use https://www.akeebabackup.com/products/akeeba-backup.html
Just backup the site with the component then use the kickstart.php file to extract the website. You may need to rename/copy the .htaccess file still.
Use apache? only apache server works an .htaccess file configuration. IIS and others not work these method.
Your ftp client show the hidden files? .foo is hidden for linux servers.
It looks like in your old server, you had default sef enabled (configuration->enable sef).
On your new server, you have it disabled.
Trying to get MAMP running with Dreamweaver.
When I preview a php file inside Dreamweavers 'Live View' mode instead of working direct from my file:
http://localhost/php_test/timetest.php
it creates its own temp file which looks like:
http:// 127.0.0.1/php_test/ TMPWY5ZEM.php
(I've added the additional spaces as stockoverflow assumed I was spamming)
I know the localhost runs correctly as if I type the URL directly into a browser it runs fine.
I've set up the Dreamweaver site correctly to the best of my knowledge, the details are below:
Local site folder:
/Applications/MAMP/htdocs/php_test
Server Folder:
/Applications/MAMP/htdocs/php_test
Web URL:
http://localhost/php_test/
Testing Server:
PHP MySQL
Any help?
This typically means that you have the preview using temporary file preference set (which I believe may be a default setting). Do the following:
Edit (Dreamweaver on Mac) Preferences, Preview in Browser category, uncheck Preview using temporary file
setup a testing server, if you have some problems from there, set your site type to localhost.