This is a discussion on Basic RewriteBase question... within the Apache Web Server forums, part of the Web Server and Related Forums category; my site is in a path like this: http://localhost/mysite there are two files: http://localhost/mysite/1.txt ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
my site is in a path like this: http://localhost/mysite
there are two files: http://localhost/mysite/1.txt and http://localhost/mysite/2.txt I want to redirect from 1.txt to 2.txt using mod_rewrite, my .htaccess file is this: RewriteEngine On RewriteRule ^1.txt$ /mysite/2.txt (the .htaccess file is under /mysite folder) this works fine, but obviously I'm not happy with the folder name being hardcoded in the rule, i'd like something like this: RewriteRule ^1.txt$ /2.txt but it doesn't work. adding "RewriteBase /mysite" doesnt help. I now I'm doing something very wrong. Any help please? thx |