Hi,

I have encountered a situation wherein I should have aliases for URL of some specific nodes/pages. But if I use Clean URL it actually converts all nodes to clean URLs. For example out of 500 nodes all I need to implement the URL aliases are for 10 specific pages. Is there a modules that can do this. One more thing, I am afraid to use clean UR$L for there are Server Configuration required and I am don't even have a drop of knowledge regarding server configurations.

Thanks in advance.

Comments

VM’s picture

clean urls is site wide. for clean urls to work properly you need mod_rewrite enabled on your server. If you passed the clean url test, there is nothing more to configure.

johnrosswvsu’s picture

Sorry I have read about that and I seem to be lost to the Server Configuration Field/Area. That's also a problem I only wanted clean URL to apply to specific pages...

John Ross C. / Web Developer
johnross@prometsource.com
Promet Source
1802 W Berteau Ave Suite 209 Chicago, IL 60613

Drupal Web Development

VM’s picture

clean urls are site wide. If enabled all urls are cleaned.

To only enable clean urls on certain paths, if even possible would require more server configuration then enabling mod_rewrite.

johnrosswvsu’s picture

Yes... Sad to say it's my problem right now... But thanks anyway. Maybe I could deal more with the path module for URL Aliases. It's a start and better than nothing at all. :) thanks a lot.

---------------------------------
I am like a new-born bird trying to fly but couldn't do so...
Need someone else's wings to lift me up...

John Ross C. / Web Developer
johnross@prometsource.com
Promet Source
1802 W Berteau Ave Suite 209 Chicago, IL 60613

Drupal Web Development

kirie’s picture

are you sure you are not mixing up or confusing clean URLs and URL alias? Just in case, here are some examples:

Default URL:
http://www.example.com/?q=node/123

Default URL with URL alias:
http://www.example.com/?q=mynode

Clean URL:
http://www.example.com/node/123

Clean URL with URL alias:
http://www.example.com/mynode

Now, if you want clean URLs on your whole site, and only want URL aliases for, say, 10 pages - that is perfectly doable using the core path module. The path module will not automatically create URL aliases for all your pages - that functionality is provided by the contributed pathauto module.

rockefeller’s picture

Hi!

I want to implement Clean Urls function to work to the following case:

I have a main website called www.hiwz.org, the domain name is hosted in the server www.chistescool.com/hiwz

This means that when you enter hiwz.org you are really seeing chistescool.com/hiwz contents. The thing is that I have installed drupal in that subdirectory and Im able to enable Clean Url correctly at www.chistescool.com/hiwz. The problem is that when I enter www.hiwz.org and try to login to the drupal application, I have a 500 server error (when clean urls is enabled). Ive read different posts about making Clean Url work in a multisite, but most of them are in the same server (different drupal installs in main directory and subdirectory) or at least none of them has spoke about this type of issue.

I host my websites in godaddy, which allows to host other domain names in your same server. It is shared hosting and obviously mod-rewrite, etc are working because clean url can be enabled and works properly if you enter to the domain www.chistescool.com/hiwz

I want to make it work for www.hiwz.org , is it possible??

Thanks in advance for your help

VM’s picture

try opening settings.php and set a $base_url

settings.php is protected as is the default folder I believe, thus you will have to change permissions on these to ensure that your changes to $base_url takes.

rockefeller’s picture

VeryMisunderstood, thanks for your advice. I saw your response today, and did not accesed yesterday. I solved it with the .htaccess file. I had a 500 Internal server error when I login through the addon domain or clicked in any other sections when clean url was active. As the addon domain points to a another domain with a subdirectory, What I needed to do was the following:

In the .htaccess file I had to change the following:

BEFORE
--------------------------------------------
# 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]

AFTER (included full URL and it worked correctly from the main domain... it cannot be accesed through the other subdirectory though, still I did not needed that)
--------------------------------------------

# 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 ^(.*)$ http://www.example.com/index.php?q=$1 [L,QSA]

Hope it helps to others trying to do the same. Remember if you have a 500 internal server errors and addon domains involved, try this.

Good luck!