Forum Moderators: phranque
It looks like this:
Options +FollowSymlinks -Indexes
RewriteEngine On
RewriteRule ^(conventional-reels¦combos¦lights¦rod-holders¦casting-reels¦gps¦chartplotters¦vhf-radio
¦trolling-motors¦hooks¦cast-nets¦line-and-leader¦electric-reels¦lures¦rods¦terminal-tackle¦tools
¦spinning-reels¦storage¦rods¦fishfinders¦accessories¦fly-reels¦sunglasses¦watches¦binoculars¦kites
¦downriggers¦radar¦fighting-belts¦gaffs¦harpoons)/$ /fishing-tackle.php?cid=$1 [nc,L]
RewriteRule ^(conventional-reels¦combos¦lights¦rod-holders¦casting-reels¦gps¦chartplotters¦vhf-radio¦
trolling-motors¦hooks¦cast-nets¦line-and-leader¦electric-reels¦lures¦rods¦terminal-tackle¦tools
¦spinning-reels¦storage¦rods¦fishfinders¦accessories¦fly-reels¦sunglasses¦watches¦binoculars¦kites
¦downriggers¦radar¦fighting-belts¦gaffs¦harpoons)/(.*)\.html$ /fishing-tackle.php?cid=$1&pid=$2 [nc,L]
RewriteRule ^(.*)\-boats\/(.*)\.html$ /boats.php?mlink=$1&plink=$2 [nc,L]
RewriteRule ^(.*)\-boats\/$ /boats.php?mlink=$1 [nc,L]
RewriteRule ^(.*)\-NGK\-Spark\-Plugs\-details\-([0-9]+)\.html$ /ngk-spark-plugs.php?pid=$1&plugid=$2 [nc]
RewriteRule ^(.*)\-NGK\-Spark\-Plugs\-list\.html$ /ngk-spark-plugs.php?lid=$1 [nc]
RewriteRule ^(.*)\-NGK\-Spark\-Plugs\.html$ /ngk-spark-plugs.php?cid=$1 [nc]
RewriteRule ^(.*)\.html$ /sitemap.php?aid=$1 [nc]
RewriteRule ^rss\-(.*)\.php$ /rss.php?cat=$1 [nc]
Can you see any issues?
[edited by: jdMorgan at 8:03 pm (utc) on Mar. 17, 2006]
[edit reason] Fixed side-scroll. [/edit]
I also have an issue where a .html page that doesnt exist is automatically redirected to the home page index.php
Instead of a 404 page not found...
RewriteRule ^(.*)\.html$ /sitemap.php?aid=$1 [nc]
Also note that you'll get much better performance out of these rules if you use a forward-looking negative match, rather than the abiguous ".*" pattern. In addition, always use the [L] flag unless you have a known reason not to. For example:
RewriteRule ^([^.]+)\.html$ /sitemap.php?aid=$1 [NC,L]
RewriteRule ^([^.]+)\.html$ /sitemap.php?aid=$1 [NC,L]
What changes would I make to this so that the pages that I can publish .html pages manually?
Could this screw with G's indexing?
Can't figure out why G is not indexing the new pages...
My other sites are seeing good indexing...
You can put a RewriteCond ahead of that rule to exclude files that exist from being re-written to the script, using something like
RewriteCond %{REQUEST_FILENAME} !-f