[wp-hackers] .htaccess cleanup

Denis de Bernardy denis at semiologic.com
Sun May 22 18:08:29 GMT 2005


While checking my .htaccess file, I found plenty of things like:

RewriteRule ^(projects/sem-theme)/trackback/?$ /index.php?pagename=$1&tb=1
[QSA,L]
RewriteRule ^(projects/sem-theme)/feed/(feed|rdf|rss|rss2|atom)/?$
/index.php?pagename=$1&feed=$2 [QSA,L]
RewriteRule ^(projects/sem-theme)/(feed|rdf|rss|rss2|atom)/?$
/index.php?pagename=$1&feed=$2 [QSA,L]
RewriteRule ^(projects/sem-theme)/page/?([0-9]{1,})/?$
/index.php?pagename=$1&paged=$2 [QSA,L]
RewriteRule ^(projects/sem-theme)(/[0-9]+)?/?$
/index.php?pagename=$1&page=$2 [QSA,L]

One to a page. Given that I intend to use WP as a CMS, I expect the file to
quickly become huge. Thus, I was wondering, why something like the following
is not used:

RewriteRule ^(.+)/trackback/?$ /index.php?pagename=$1&tb=1 [QSA,L]
RewriteRule ^(.+)/feed/(feed|rdf|rss|rss2|atom)/?$
/index.php?pagename=$1&feed=$2 [QSA,L]
RewriteRule ^(.+)/(feed|rdf|rss|rss2|atom)/?$ /index.php?pagename=$1&feed=$2
[QSA,L]
RewriteRule ^(.+)/page/?([0-9]{1,})/?$ /index.php?pagename=$1&paged=$2
[QSA,L]
RewriteRule ^(.+)(/[0-9]+)?/?$ /index.php?pagename=$1&page=$2 [QSA,L]

--  
Denis



More information about the wp-hackers mailing list