Code:
RewriteRule ^fileone.html$ filetwo.html
could simply be edited to:[code]
RewriteEngine on
RewriteRule ^fileone
\.html$ filetwo.html
[R=301,L]
Where the first line is merely getting mod_rewrite ready to go, the \ merely forces the dot charater to be a dot character (not a metacharacter representing ANY character) and the Last flag added so this RewriteRule is not ANDed with any succeeding rules.
- but I need to know how to do this:
Code:
RewriteRule ^{filename}/{variable}$ {filename}.html?var={variable}
Edited to:
Code:
# pseudo code
# RewriteRule ^{filename}/{variable}$ {filename}.html?var={variable}
# replace pseudo code
RewriteRule ^([a-z.]+)/([a-z.]+)$ $1.html?var=$2 [L]
Where the {filename} and {variable} consist ONLY of one or more lowercase letters and, perhaps, a dot character (for a file extension).
I like to learn the basics first one step at a time.
Thanks for taking the time to respond though.
Bookmarks