Redirecting URLs

Writerslife.org Website

Automatic Content Generation with Article Spinner

Get Instant Access

You can set Drupal to redirect from one URL to another using the Path Redirect module. Install, enable, and set permissions for it, as shown in Table 6.4.

TABLE 6.4 Path Redirect Module Reference

Download from drupal.org/project/path_redirect

Enable in section Other

Permissions

Path Redirect Module Administer redirects

Administration

Administration, Site Building, URL List, Add-Redirect, Settings, Export

Redirects (admin/build/path-redirect)

By now, the basic administration tools should be familiar. The first button is a list of the URL redirects that you have created. As you can see in Figure 6.11, you can edit or delete each one; you can also use the live links on the from and to URLs to check out what it is doing.

FIGURE 6.11

List, edit, and delete URL redirects.

URL redirects [ testsiti

^ M I »- 5 http7/nortl5countryconsulilng.com:30/testslte/admlnihulld/path-redirect

Search this site:

jfeiler

My account My bookmarks Proñle Export CSV

Recent posts Feed aggregator Administer

Content management Site building

URL redirects

Add redirect Settings

Here you can set up URL redirecting For this site. Any existing oi redirect to any internal or external URL.

>n-existing path within this site c;

From To Type Language Operations node/724 http://www.yoursite,com/from_drupal?section =724 307 All edit delete node/999 http://northcountryconsuIting,com:80/testsi te/frontpage 301 All edit delete

If you choose to edit or add a URL redirect, you have the options shown in Figure 6.12.

Add redirect | testsite

+ http://norih coun trycon suiting, com: 80/te s tsite/ad mi ri/build/path-redirect/add

Search this site:

jfeiler

My account My bookmarks Profile Export CSV Create content Recent posts Feed aggregator Administer

Content management Site building Blocks

Contact form

ImageCache

Menus

Modules

Site documentation TTiemes

Translate Interface Triggers URL aliases URL redirects

_Views_

http://northcountryconsulting.co

node/724

Enter an Iriteral Drupal path or pat (e.g. tandtor) are not allowed.

o redirect (e.g. node/123 or taxonomy/term/123). F

To: http://vvwvv.^pursjte..com/from_dmRal

Enter an Iriteral Drupal path, path alias, or complete external URL (like http://example.com/) to redirect to < front> to redirect to the front page. Enter (optional) queries after"?" and (optional) anchor after "f". Mo: redirects will not contain queries or fragment anchors.

Language:

All languages hv-j

A redirect set for a specific language will always be used when requesting this page In that language, and tc precedence over redirects set for All languages.

Advanced options

Redirect status:

' 300 Multiple Choices

302 round

303 See Other P ^ernlanendv- The resource has permanently moved el

304 Not Modified 1 to. Recommended.

305 Use Proxy__tmporarlly moved elsewhere, the response Indicates whi

A preferred alternative source should be used at p 304 Not Modified: The server has Identified from the request information that the clien Information Is up-to-date and the requested Information does not need to be sent agal :■ 305 Use Proxy: The request must be sent through the Indicated proxy server. 307 Temporary Redirect: The resource has temporarily moved elsewhere, the response at present. Client should still use this URL.

You can specify the path within your Drupal directory from which to redirect, and you specify the Drupal path or fully qualified path to which it should be redirected. Note that the redirection can include a query string.

You can also specify the status to be returned for this redirection. This is particularly important for helping search engines keep up with your site and its changing URLs.

The Settings section lets you set defaults for URL redirection, as shown in Figure 6.13. These are not Drupal-specific settings; they are the settings most people want to use to manage any reasonably complex website. You will normally not do any damage if you leave the default settings, at least while you are working to get your site up and running.

FIGURE 6.12

Add or edit a URL redirect.

«no

URL redirects List Add redirect

□ Display a warning messag

e to users when they are redirected.

jfeiler

□ Allow users to bypass red

ects by adding ?redirect-rio to the URL.

My account

Discard redirects that hav

<„tek, UH

not been accessed for:

My bookmarks

Profile Export CSV

Create content

Default redirect status:

Recent posts

1 30 L Moved Permanently

Feed aggregator

o 300 Multiple Choices: The reque

st Is ambiguous and needs clarification as to which resource was requested.

Administer

O 301 Mowed Permanently: Moved Permanently. The resource has permanently moved elsewhere, the response Indicates where It has gone to. Recommended,

Content management

O 302 Found: The resource has te

mporarlly moved elsewhere, the response Indicates where It Is at present. This is Drupal's

Site building

default redirect type.

o 303 See Cither: See Other/Red

rect. A preferred alternative source should be used at present.

Blocks

o 304 Not Modified: The server he

Identified from the request Information that the client's copy of the Information is up-to-

Contact form

date and the requested Informa

lon does not need to be sent again.

FBg,

o 305 Use Proxy: The request mu

st be sent through the Indicated proxy server.

o 307 Temporary Redirect: The re

source has temporarily moved elsewhere, the response Indicates where It Is at present.

ImageCache

Client should still use this URL.

Menus

You can find more Information a Bo

lit HTTP redirect status codes at http://www.w3. org/Protocol s/rfc2616/rfc2616-

Modules

Site documentation

Themes

(Save configuration^) (Reset to

»

_ - - -_

Configure default settings for URL redirection.

Was this article helpful?

0 0
Article Marketing Knockdown

Article Marketing Knockdown

The lifeblood of any online business is in being able to generate highly targeted, consistent traffic to your websites, landing pages and squeeze pages.

Get My Free Ebook


Post a comment