Hi,

What are my chances to rename contact form URL from /contact to /feedback ?

Thanks,

Comments

alekm’s picture

I don't know how to rename the default contact form. BUT, if you make a page called "feedback" and just put the form code into it with full HTML input type, it will work. You can get the form code by going to your contact page, viewing source, and copy everything from form to /form. I don't know if this is the best way to do it, but it works.

Here is a form that you can use, with all formatting removed (DIVs, etc).

<form action="/ast/?q=contact"  accept-charset="UTF-8" method="post" id="contact-mail-page">
Your name: <span class="form-required" title="This field is required.">*</span><br />

 <input type="text" maxlength="255" name="name" id="edit-name"  size="30" value="admin" class="form-text required" /></p>
<p>Your e-mail address: <span class="form-required" title="This field is required.">*</span><br />
 <input type="text" maxlength="255" name="mail" id="edit-mail"  size="30" value="" class="form-text required" /></p>
<p> Subject: <span class="form-required" title="This field is required.">*</span><br />
 <input type="text" maxlength="255" name="subject" id="edit-subject"  size="30" value="" class="form-text required" /></p>
<p> Message: <span class="form-required" title="This field is required.">*</span><br />

 <textarea cols="20" rows="5" name="message" id="edit-message"  class="form-textarea resizable required"></textarea></p>
<p><input type="checkbox" name="copy" id="edit-copy" value="1"   class="form-checkbox" /> Send yourself a copy.</p>
<p><input type="submit" name="op" id="edit-submit" value="Send e-mail"  class="form-submit" /><br />
<input type="hidden" name="form_token" id="edit-form-token" value="fe2b7489d1c8c3e1c90c6b8b3d2395b7"  /><br />
<input type="hidden" name="form_id" id="edit-contact-mail-page" value="contact_mail_page"  /></p>
</form>
coreyp_1’s picture

Just create a URL Alias of "feedback" to "contact". The Drupal Menu (and URL) system will take care of the rest.

- Corey

wicketywick’s picture

this is the right way going about the problem

cog.rusty’s picture

Enable the path module (included in Drupal) and you will get an "URL aliases" option in your admin menu.

mareks’s picture

Yes, this works for core contact form.

However, I have also enabled the Contact Forms module that enables the personal email forms.

I would not want to add an URL alias for each of my contacts.

Hmm...

This is the current mod_rewrite from my Drupal 6 site.

Code:

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

Is it possible to modify it in a way that it would redirect for example:

www.example.com/mail/john doe
to
www.example.com/contact/john doe

Thanks,

cog.rusty’s picture

For automatic URL aliasing involving many users, probably your best bet is the pathauto module together with the token module.

Using apache rewrites is not the same. They would visibly change the first URL to the second, but the second URL should already exist in Drupal. With Drupal's URL aliasing the second URL is created.