[TYPO3-UG Dutch] 301 redirect

HocomAdvies [ Wiechert Hooghwinkel ] info at hocom-advies.nl
Tue Jan 18 13:20:22 CET 2011


Jacco,

Ja dat ziet er mooi uit, zo ver was ik ook al wel gekomen, maar het is nog niet het antwoord op mijn vraag? 

Voor de volledigheid de actieve inhoud van de .htaccess die ik nu heb:

### Begin: Rewrite stuff ###

# Enable URL rewriting
RewriteEngine On


#redirects voor oude in google index aanwezige pagina's
#die staan hier en niet aan het einde van de /htaccess omdat het dan niet werkte

#redirect voor /?actie=aanbieding_nieuw
RewriteCond %{REQUEST_URI} ^([^&]*&)*(/?)=|actie=(aanbieding_nieuw)&? [NC] 
RewriteRule .* /aanbieding [L,R=301]

#redirect voor /?actie=bedrijven
RewriteCond %{REQUEST_URI} ^([^&]*&)*(/?)=|actie=(bedrijven)&? [NC] 
RewriteRule .* /bedrijven [L,R=301]

#redirect voor /?actie=contact
RewriteCond %{REQUEST_URI} ^([^&]*&)*(/?)=|actie=(contact)&? [NC] 
RewriteRule .* http://www.menes.nl/contact [L,R=301]

#redirect voor /?actie=werkwijze
RewriteCond %{REQUEST_URI} ^([^&]*&)*(/?)=|actie=(werkwijze)&? [NC] 
RewriteRule .* /werkwijze [L,R=301]

#redirect voor /?actie=fotohoek
RewriteCond %{REQUEST_URI} ^([^&]*&)*(/?)=|actie=(fotohoek)&? [NC] 
RewriteRule .* /voorbeelden [L,R=301]

#redirect voor /?actie=fotoboek
RewriteCond %{REQUEST_URI} ^([^&]*&)*(/?)=|actie=(fotoboek)&? [NC] 
RewriteRule .* /voorbeelden [L,R=301]

#redirect voor /?actie=fotoboek&voorbeelden=tafels&foto=1 
RewriteCond %{REQUEST_URI} ^/([^&]*&)*(/?)=|actie=(fotoboek&map=voorbeelden&foto=1)&? [NC] 
RewriteRule .* /voorbeelden [L,R=301]

#redirect voor /aanbieding.php
RewriteCond %{REQUEST_URI} ^/aanbieding.php/$
RewriteRule .* /aanbieding [L,R=301]
RewriteCond %{REQUEST_URI} ^/aanbieding.php$
RewriteRule .* /aanbieding [L,R=301]

### einde redirects vanuit google ####


#######
#redirect van url zonder www naar met www om duplicated contet te voorkomen
RewriteCond %{HTTP_HOST} ^desite.nl
RewriteRule (.*) http://www.desite.nl/$1 [R=301,L]
######


# If you use the RealUrl extension, then you'll have to enable the next line.
# You will have to change this path if your TYPO3 installation is located
# in a subdirectory of the website root.
# 
# If you place this in httpd.conf, you cannot use this directive in any case!
#RewriteBase /

# Stop rewrite processing if we are in the typo3/ directory
# For httpd.conf, use this line instead of the next one:
# RewriteRule ^/TYPO3root/(typo3/|t3lib/|tslib/|fileadmin/|typo3conf/|typo3temp/|uploads/|showpic\.php|favicon\.ico) - [L]
RewriteRule ^(typo3/|t3lib/|tslib/|fileadmin/|typo3conf/|typo3temp/|uploads/|showpic\.php|favicon\.ico) - [L]

# Redirect http://mysite/typo3 to http://mysite/typo3/index_re.php
# and stop the rewrite processing
# For httpd.conf, use this line instead of the next one:
# RewriteRule ^/TYPO3root/typo3$ /TYPO3root/typo3/index.php [L]
RewriteRule ^typo3$ typo3/index_re.php [L]

# If the file/symlink/directory does not exist => Redirect to index.php
# Important note: If you copy/paste this into httpd.conf instead
# of .htaccess you will need to add '%{DOCUMENT_ROOT}' left to each
# '%{REQUEST_FILENAME}' part.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l

# Main URL rewriting.

# If you use Windows and SimulateStaticDocuments do not work, try adding a
# slash (/) right before 'index.php' below.

# The example shows how to rewrite only *.html and *.pdf files to index.php
# This may be helpful when using an extension that can generate PDF files
# on the fly.
# Example: RewriteRule .*\.(html|pdf)$ index.php [L]

# For httpd.conf, use this line instead of the next one that has no '#':
# RewriteRule .* /TYPO3root/index.php [L]

# For use with the RealUrl extension, you might need to remove the
# RewriteBase directive somewhere above and use this line instead of the
# next one:
# RewriteRule .* /index.php [L]

RewriteRule .* index.php [L]

### End: Rewrite stuff ###

# Add your own rules here



Met vriendelijke groeten,
Wiechert Hooghwinkel


Op 18 jan 2011, om 12:15 heeft Jacco van der Post het volgende geschreven:

> Vooruit, hier een goede .htaccess :)
> 
> 
> 
> 
> php_value memory_limit 128M
> php_value post_max_size 128M
> php_value upload_max_filesize 128M
> 
> # *************************************
> # REALURL
> # *************************************
> RewriteEngine On
> RewriteRule ^typo3$ - [L]
> RewriteRule ^typo3/.*$ - [L]
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteCond %{REQUEST_FILENAME} !-l
> RewriteRule .* index.php
> 
> 
> # *************************************
> # Handle compressed .js and .css files correctly TYPO3 4.4 +
> # *************************************
> <FilesMatch "\.js\.gzip$">
>  AddType "text/javascript" .gzip
> </FilesMatch>
> <FilesMatch "\.css\.gzip$">
>  AddType "text/css" .gzip
> </FilesMatch>
> AddEncoding gzip .gzip
> 
> 
> # *************************************
> #   301 redirect oude links tbv SEO
> # *************************************
> 
> 
> RewriteCond %{REQUEST_URI} ^/bla/$
> RewriteRule .* /blanieuw/ [L,R=301]
> RewriteCond %{REQUEST_URI} ^/bla$
> RewriteRule .* /blanieuw/ [L,R=301]
> 
> RewriteCond %{REQUEST_URI} ^/bliep/$
> RewriteRule .* /bliepnieuw/ [L,R=301]
> RewriteCond %{REQUEST_URI} ^/bliep$
> RewriteRule .* /bliepnieuw/ [L,R=301]
> 
> #etc etc etc
> 
> 
> 
> -- 
> Met vriendelijke groet
> Kind Regards
> 
> Jacco van der Post
> Certified TYPO3 Integrator
> 
> Tel +31 (0)24 3602100
> 
> www.id-internetservices.com
> _______________________________________________
> TYPO3-UG-Dutch mailing list
> TYPO3-UG-Dutch at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-ug-dutch



More information about the TYPO3-UG-Dutch mailing list