468,768 Members | 1,318 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,768 developers. It's quick & easy.

URL Rewrite for Localhost

133 100+
Hi,

I am working off local host and i want to use htaccess but i am unsure on the code that i would need.

This is my normal re-write rule for a domain like e.g http://www.bob.com/info..php

Expand|Select|Wrap|Line Numbers
  1. RewriteEngine On
  2. RewriteRule ^([a-zA-Z0-9-_]+)\.html$ info.php?title=$1
  3.  
But on local host the url is: http://localhost/xampp/websites/site1/info.php so what would i put in the htaccess file for this?

I was thinking something like this but it does not work;

Expand|Select|Wrap|Line Numbers
  1. RewriteEngine On
  2. RewriteRule ^([a-zA-Z0-9-_]+)/([a-zA-Z0-9-_]+)/([a-zA-Z0-9-_]+)/([a-zA-Z0-9-_]+)/([a-zA-Z0-9-_]+)\.html$ info.php?cat=$1&item=$2&other_item=$3&title=$4&others_items=$5
  3.  
Cheers,
Adam
Oct 1 '08 #1
0 2657

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Link | last post: by
reply views Thread by Patrick.O.Ige | last post: by
reply views Thread by darrel | last post: by
1 post views Thread by baroque Chou | last post: by
14 posts views Thread by Stan Canepa | last post: by
3 posts views Thread by girirajg | last post: by
20 posts views Thread by =?Utf-8?B?cmtibmFpcg==?= | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.