My code is not working, even after reading DKLynn's tutorial and I don't know why :(

I have been banging my head but please tell me where I am going wrong with my code. I am trying to rediret to a another directory and .html splash page as you will see:

1.To use URL Alias you need to be running apache with mod_rewrite enabled.

  1. In your opencart directory rename htaccess.txt to .htaccess.
# For any support issues please visit: http://www.opencart.com
DirectoryIndex

Options +FollowSymlinks

# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/

RewriteBase /site_begin/trial.html
RewriteRule sitemap.xml /index.php?route=feed/google_sitemap
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

# Prevent Directoy listing
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "\\.(tpl|ini|log)">
 Order deny,allow
 Deny from all
</FilesMatch>

[QUOTE=dklynn;5162570]areol,

You need to review a few things:

  1. The placement of the hyphen in a range definition makes it a metacharacter - e.g., to define a-d (a, b, c and d). To specify a hyphen character, it must be first (although last seems to be acceptable, too).

  2. The characters allowed with a URI are enumerated in a paper by Sir Tim Berners-Lee entitled Uniform Resource Identifiers (URI): Generic Syntax and you are attempting to use reserved characters. Clearly, if you violate the long-established rules for URIs, you will fail - as you have already proved.

Do you need the list of characters I use at http://wilderness-wally.com?

Regards,

DK[/QUOTE]

:bang:

When you alter the URIs of a canned program, you run the danger of disabling the program’s URI aliasing module.

[COLOR="#FF0000"]DirectoryIndex
# WHAT? No files identified by this directive? It appears that index.php is the file used by opencart[/COLOR]

Options +FollowSymlinks
[COLOR="#FF0000"]# Probably redundant but it doesn't hurt.[/COLOR]

# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/

[COLOR="#FF0000"]RewriteBase /site_begin/trial.html
# This should NOT be a file, it should be the directory where the shop is located, i.e., / (the {DOCUMENT_ROOT})[/COLOR]
RewriteRule sitemap.xml /index.php?route=feed/google_sitemap
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([COLOR="#FF0000"][^?]*[/COLOR]) index.php?_route_=$1 [L,QSA]
[COLOR="#FF0000"]# What does that mean? IMHO, the regex part of this should be . and the $1 replaced by %{REQUEST_URI}[/COLOR]

# Prevent Directoy listing
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "\\.(tpl|ini|log)">
[COLOR="#FF0000"]# Don't forget your .htaccess file![/COLOR]
 Order deny,allow
 Deny from all
</FilesMatch>

It appears that you’ve modified opencart’s mod_rewrite code (and more?). Perhaps it would be better to get the original file and try with that before making further modifications.

Regards,

DK