Forum Moderators: phranque
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress Redirect 301 /template.asp?page=qui_nous&titre=qui_nous http://www.mysite.com/qui-sommes-nous/
RewriteCond %{REQUEST_URI} !^/url-path-of-page-that-I-do-not-want-to-rewrite-or-redirect.html$
-or-
RewriteCond %{REQUEST_URI} !^/url-path-of directroy-that-I-do-not-want-to-rewrite-or-redirect/
RewriteCond %{REQUEST_URI} !^/wp-admin/
# Redirect direct client requests for URL-path /index.php to / and for /folder/index.php to /folder/
# Likewise for default.php direct requests in root or in folder,
# With exception to avoid mess up in the admin
RewriteCond %{REQUEST_URI} !^/wp-admin/
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*(index|default)\.(php|html?|asp)([?#][^\ ]*)?\ HTTP/
RewriteRule ^(([^/]+/)*)(index|default)\.(php|html?|asp)$ http://www.atable.com/$1 [R=301,L]
http://localhost/www.atable-new.com/
# Redirect direct client requests for URL-path /index.php to / and for /folder/index.php to /folder/
# Likewise for default.php direct requests in root or in folder,
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*(index|default)\.(php|html?|asp)([?#][^\ ]*)?\ HTTP/
RewriteRule ^(([^/]+/)*)(index|default)\.(php|html?|asp)$ http://localhost/www.atable-new.com/$1 [R=301,L]
http://localhost/www.atable-new.com/wp-admin/admin.php?page=wpsc-edit-groups <a href='#' onclick='return showedit_categorisation_form()'> and opens the category edit form on the right lower part of the web page (same URL).
# Redirect direct client requests for URL-path /index.php to / and for /folder/index.php to /folder/
# Likewise for default.php direct requests in root or in folder,
# This rule customized to avoid mess up in the admin
RewriteCond %{REQUEST_URI} !^/wp-admin/
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*(index|default)\.(php|html?|asp)([?#][^\ ]*)?\ HTTP/
RewriteRule ^(([^/]+/)*)(index|default)\.(php|html?|asp)$ http://localhost/www.atable-new.com/$1 [R=301,L]
RewriteEngine on
# Unless you have set a different RewriteBase preceding this point,
# you may delete or comment-out the following RewriteBase directive:
RewriteBase /localhost/www.atable-new.com/
# if this request is for "/" or has already been rewritten to WP
RewriteCond $1 ^(index\.php)?$ [OR]
# or if request is for image, css, or js file
RewriteCond $1 \.(gif|jpg|jpeg|png|css|js|ico)$ [NC,OR]
# or if URL resolves to existing file
RewriteCond %{REQUEST_FILENAME} -f [OR]
# or if URL resolves to existing directory
RewriteCond %{REQUEST_FILENAME} -d
# then skip the rewrite to WP
RewriteRule ^(.*)$ - [S=1]
# else rewrite the request to WP
RewriteRule . /index.php [L]
# END WordPress
RewriteEngine On
RewriteBase /
#
# (here came some specific redirect rules)
#
# Redirect direct client requests for URL-path /index.php to / to avoid duplicate content
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /index\.php([?#][^\ ]*)?\ HTTP/
RewriteRule ^index\.php$ http://www.example.com/ [R=301,L]
#
# Redirect requests for non-blank, non-canonical hostnames to canonical hostname
RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
#
# BEGIN WordPress
# Except for requests for /index.php and for the most-frequently-requested
# filetypes that WP cannot generate, rewrite all URL requests which do not
# resolve to an existing file or directory to the WordPress script filepath
RewriteCond $1 !^index\.php$
RewriteCond $1 !\.(gif|jpe?g|png|ico|css|js)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ /index.php [L]
# END WordPress
RewriteEngine On
RewriteBase /
#
# (here came some specific redirect rules)
#
# Redirect direct client requests for URL-path /index.php to / to avoid duplicate content
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /index\.php([?#][^\ ]*)?\ HTTP/
RewriteRule ^index\.php$ http://localhost/www.atable-new.com/ [R=301,L]
#
# Redirect requests for non-blank, non-canonical hostnames to canonical hostname
RewriteCond %{HTTP_HOST} !^(www\.atable-new\.com)?$
RewriteRule ^(.*)$ http://localhost/www.atale-new.com/$1 [R=301,L]
#
# BEGIN WordPress
# Except for requests for /index.php and for the most-frequently-requested
# filetypes that WP cannot generate, rewrite all URL requests which do not
# resolve to an existing file or directory to the WordPress script filepath
RewriteCond $1 !^index\.php$
RewriteCond $1 !\.(gif|jpe?g|png|ico|css|js)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ /atable-new/index.php [L]
# END WordPress
RewriteEngine on
# REWRITEBASE
# may be online (www.atable.com) or local (http://localhost/www-atable-new.com)
### local
RewriteBase /www.atable-new.com/
### online
## RewriteBase /
# ADDITIONAL JIM MORGAN RULES:
# Redirect direct client requests for URL-path /index.php to / to avoid duplicate content
# with the exception of wp-admin directory
### local
RewriteCond %{REQUEST_URI} !^/www.atable-new.com/wp-admin/
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*(index|default)\.(php|html?|asp)([?#][^\ ]*)?\ HTTP/
RewriteRule ^(([^/]+/)*)(index|default)\.(php|html?|asp)$ http://localhost/www.atable-new.com/$1 [R=301,L]
### online
## RewriteCond %{REQUEST_URI} !^/wp-admin/
## RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*(index|default)\.(php|html?|asp)([?#][^\ ]*)?\ HTTP/
## RewriteRule ^(([^/]+/)*)(index|default)\.(php|html?|asp)$ http://www.atable.com/$1 [R=301,L]
# Redirect requests for non-blank, non-canonical hostnames to canonical hostname
### local - I don't get it to work
### online
## RewriteCond %{HTTP_HOST} !^(www\.atable\.com)?$
## RewriteRule ^(.*)$ http://www.atable.com/$1 [R=301,L]
# NORMAL JIM MORGAN RULES:
# if this request is for "/" or has already been rewritten to WP
RewriteCond $1 ^(index\.php)?$ [OR]
# or if request is for image, css, or js file
RewriteCond $1 \.(gif|jpg|jpeg|png|css|js|ico)$ [NC,OR]
# or if URL resolves to existing file
RewriteCond %{REQUEST_FILENAME} -f [OR]
# or if URL resolves to existing directory
RewriteCond %{REQUEST_FILENAME} -d
# then skip the rewrite to WP
RewriteRule ^(.*)$ - [S=1]
# else rewrite the request to WP
# FINISH TO WP
### local with normal Jim Morgan's rules
RewriteRule . /www.atable-new.com/index.php [L]
### online with normal Jim Morgan's rules
## RewriteRule . /index.php [L]
### online with additional Jim Morgan's rules
## RewriteRule ^(.+)$ /index.php [L]
# END WordPress