The Linux Page

Drupal paths that won't work!

As I created a new site to list all of my accounts on the Internet, I thought the folder where those accounts appear should be called profiles. But somehow autopath did not generate the URL Alias as expected.

I tried several times and each time it returned an empty alias. Then I tried adding the alias by hand and that was accepted by Drupal, but when I then tried to go to that page it failed with an Apache error which at first I found odd. Then I recalled that there was a folder named profiles in the top directory of Drupal. The Drupal code (from the .htaccess) tells Apache to make use of files that exist on the disk:

  # Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

This code asks Apache to check whether a file (-f) or directory (-d) exist with the specified request filename, then you should reply with that info instead of running Drupal. This is important for files such as the robots.txt, favicon.ico, jQuery files, etc.

So... the only solution in this case is to use a different path!

Drupal Core has the following paths and all of those are prohibited, although the URL Alias module does not prevent you from reusing such paths!


SMS From Me Logo

SMS From Me

To automatically start one on one conversations with your online leads.