3

I just moved my drupal website to another host. But I am unable to login as mysite.com/user. It gives me a 404 not found error which means clean urls are not working afaik.

So, I checked PHP configuration with phpinfo(); and there is "mod_rewrite" visible in "loaded modules" section.

Anyway, I wanted to disable clean urls, however if I try to login as mysite.com/?q=user, it redirects to mysite.com/user and it is giving 404 not found error again.

So I kinda have no way to login to my website to update URL aliases. I have renamed my .htaccess file to disable it, result did not change.

I have updated this line:

  RewriteRule ^ index.php [L]

to this line:

  # RewriteRule ^ index.php [L]
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

Still, nothing changes. Since I can't control the web server, all I have is FTP and MySQL. Any ideas?

3

You can add this line to your settings.php file and it would allow you to login

$conf = array( 'clean_url' => 0,);

Another method is to find the .htaccess file in D7 root, and open it, find the "# RewriteBase /drupal" in codes, delete the "#", change the "drupal" to your file's name: my file is "blog", "RewriteBase /blog" - the end change to this.

  • Hi, thank you, the configuration array has solved my problem. I mean, at least I have disabled Clean URLs. I can go like this, but I'll try to use Clean URLs now. My website is running under no folder, even not something like httpdocs. So I update the line as "RewriteBase /" but no, nothing changes. Any ideas? – kubilay Jun 26 '13 at 16:34
2

Why you not try first to disable the clean urls from site using something like

$conf = array(
   'clean_url' => 0,
);

in settings.php, or maybe searching in the database with phpmyadmin the variable clean_url. Also, take a look to this post https://drupal.org/node/256410

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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