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.

https://www.alexiswilke.me/profiles/

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!

./sites
./sites/all
./sites/default
./misc
./misc/farbtastic
./scripts
./modules
./modules/menu
./modules/update
./modules/openid
./modules/statistics
./modules/path
./modules/block
./modules/translation
./modules/contact
./modules/syslog
./modules/trigger
./modules/upload
./modules/poll
./modules/locale
./modules/node
./modules/profile
./modules/blogapi
./modules/throttle
./modules/book
./modules/php
./modules/taxonomy
./modules/search
./modules/dblog
./modules/ping
./modules/color
./modules/color/images
./modules/forum
./modules/aggregator
./modules/user
./modules/filter
./modules/comment
./modules/system
./modules/tracker
./modules/blog
./modules/help
./profiles
./profiles/default
./themes
./themes/chameleon
./themes/chameleon/marvin
./themes/garland
./themes/garland/images
./themes/garland/color
./themes/garland/minnelli
./themes/garland/minnelli/color
./themes/engines
./themes/engines/phptemplate
./themes/bluemarine
./themes/pushbutton
./includes

SMS From Me Logo

SMS From Me

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