Basic RewriteBase question...

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 ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-09-2007
juan@dcolores.net
 
Posts: n/a
Default Basic RewriteBase question...

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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:01 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0