1

I developed a website in the drupal and I have been accessing it in the development environment using the url like this "http://localhost/foldername"...

Now I have deployed the website (the folder "foldername" and database) to my Linux based hosting server.

I have to access it for testing using a URL like this "http://HostingServerIpAddress/~HostingServerUserName/foldername".

To my surprise, no menu link is working over there :( the paths are correct. The menu links which were opening in my local environment, are giving 404 error when opened using hosting urls... :(

Please guide me at your earliest.

1 Answer 1

1

When I move a site to the production environment and can only access it using an URL as you describe, I have to disable Drupal's 'Clean URLs' functionality (admin/config/search/clean-urls) in order for menu links to work properly (and probably clear the caches afterwards).

Edit:

In the documentation on configuring clean URLs, I found that changing the RewriteBase setting in the .htaccess file is the solution for me to have clean URLs once again.

So, in your case it probably should be: RewriteBase /~HostingServerUserName/foldername

9
  • 1
    Thanx for your reply... I am even unable to login, because it is also a link e.g. ("HostingServerIpAddress/~HostingServerUserName/foldername/…) So I can't do any of the change you suggested :(
    – khurram
    Commented Apr 17, 2015 at 10:28
  • 1
    I used the suffix ?q=admin/config/search/clean-urls in my URLs and it worked :)
    – khurram
    Commented Apr 17, 2015 at 10:34
  • 1
    I can't vote your reply Up, I don't have enough reputation.
    – khurram
    Commented Apr 17, 2015 at 10:36
  • 1
    Now I want to re-enable the Clean URLs, but my web site is not showing me the checkbox for enabling it. It shows a button for Run Clean URls Test and the test is failing... :(
    – khurram
    Commented Apr 17, 2015 at 11:19
  • 1
    @khurram, I've edited the answer. For me, changing the RewriteBase in the .htaccess file allows the clean URLs to work properly again. If this doesn't work for you, multiple solutions are given in the linked document, so give it a try :)
    – Watergate
    Commented Apr 17, 2015 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.