You are here

README.txt in Trailing Slash 7

TRAILING SLASH DRUPAL MODULE
----------------------------

What is it?
-----------
Adds trailing slashes to all Drupal generated clean URLs.
For example: example.com/user/.

How do I install it?
--------------------
1. Install and enable this module using one of the following methods:
http://drupal.org/documentation/install/modules-themes/modules-7

2. Add a redirect for your website that enforces trailing slashes using one of the following methods (not having duplicate pages is good for SEO):

Apache mod_rewrite example (in .htaccess):

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_METHOD} !=post [NC]
RewriteRule ^(.*(?:^|/)[^/\.]+)$ $1/ [L,R=301]

IIS URL Rewrite example (in web.config):

<configuration>
	<system.webServer>
		<rewrite>
			<rules>
				<rule name="Redirect to Trailing Slashes" enabled="true" stopProcessing="true">
 					<match url="^(.*(?:^|/)[^/\.]+)$" />
					<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
						<add input="{REQUEST_METHOD}" pattern="post" negate="true" />
					</conditions>
					<action type="Redirect" url="{R:1}/" />
				</rule>
			</rules>
		</rewrite>
	</system.webServer>
</configuration>

GlobalRedirect module [http://drupal.org/project/globalredirect]
Installing this module is a good way to perform global redirects if you can't or don't want to use web server configured redirects.

3. Go to Administration > Configuration > Search and metadata > Clean URLs in
Drupal and ensure that Enable trailing slashes is checked. Easy as that!!

Known Issues/Bugs
-----------------
None.

Sponsors
--------
Development of this module was sponsored by the Australian War Memorial [http://www.awm.gov.au/].

File

README.txt
View source
  1. TRAILING SLASH DRUPAL MODULE
  2. ----------------------------
  3. What is it?
  4. -----------
  5. Adds trailing slashes to all Drupal generated clean URLs.
  6. For example: example.com/user/.
  7. How do I install it?
  8. --------------------
  9. 1. Install and enable this module using one of the following methods:
  10. http://drupal.org/documentation/install/modules-themes/modules-7
  11. 2. Add a redirect for your website that enforces trailing slashes using one of the following methods (not having duplicate pages is good for SEO):
  12. Apache mod_rewrite example (in .htaccess):
  13. RewriteEngine On
  14. RewriteBase /
  15. RewriteCond %{REQUEST_METHOD} !=post [NC]
  16. RewriteRule ^(.*(?:^|/)[^/\.]+)$ $1/ [L,R=301]
  17. IIS URL Rewrite example (in web.config):
  18. GlobalRedirect module [http://drupal.org/project/globalredirect]
  19. Installing this module is a good way to perform global redirects if you can't or don't want to use web server configured redirects.
  20. 3. Go to Administration > Configuration > Search and metadata > Clean URLs in
  21. Drupal and ensure that Enable trailing slashes is checked. Easy as that!!
  22. Known Issues/Bugs
  23. -----------------
  24. None.
  25. Sponsors
  26. --------
  27. Development of this module was sponsored by the Australian War Memorial [http://www.awm.gov.au/].