Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mod Rewrite question

Status
Not open for further replies.

ssruprai

Programmer
Apr 24, 2002
16
IN
I have created a directory to save all my web development projects say( c:\projects) and specified it as apache document root. I store all my projects under this directory e.g c:\project1, c:\project2.

I am using this in my .htaccess for a specific project.

Options +FollowSymlinks
RewriteEngine on
RewriteBase /project1/
RewriteRule (.*)/category/(.*) products/view_products.php?cid=$2

It correctly redirects when I access a url like this:
to
But it only works when I store this .htaccess in the c:\projects folder. But if I move it to the folder c:\projects\project1 this .htaccess doesn't work.

What I want is that it should work from within the project1 directory (c:\projects\project1\.htaccess) as each project has to have its own separate directory.

I am using apache 2 but may be web host will be using apache 1.3x. So I want it to work for both versions.

Any suggestion?
Thanks in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top