I tried using the mod Rewrite feature by turning on the rewrite engine and using it in the htaccess file. I contacted my web hosting company and they said windows users cannot use the htaccess file and I would have to purchase software in order to use mod rewrite. Does anyone know another way to do rewrites outside of the htaccess file ?
Mod Rewrites
Collapse
X
-
-
I took a look at this and it seems it does require an Apache server. I am thinking about purchasing the mod rewrite license for the Windows Server environment. If anybody knows a way to do the rewrites outside of Apache let me know, it will save me a few bucks.Comment
-
ronverdonk, one other question, from what you know about mod rewrites on Apache tell me if this is possible:
Say I have a page that brings up a users information. i.e.
www.mysite.com/results.php?use r=1
The mod rewrite can write it out like:
www.mysite.com/user1/
My question: Can I then use the url www.mysite.com/user1/ to access the page directly that give would give me the users information. In other words would www.mysite.com/user1/ execute www.mysite.com/results.php?use r=1Comment
-
It would indeed.Originally posted by phpmindMy question: Can I then use the url www.mysite.com/user1/ to access the page directly that give would give me the users information. In other words would www.mysite.com/user1/ execute www.mysite.com/results.php?use r=1
Just use
[php]
$_GET['user'];
[/php]
To retrieve it.Comment
-
I use windows and apache (local) and linux/apache (live) and I use .htaccess.Originally posted by phpmindI tried using the mod Rewrite feature by turning on the rewrite engine and using it in the htaccess file. I contacted my web hosting company and they said windows users cannot use the htaccess file and I would have to purchase software in order to use mod rewrite. Does anyone know another way to do rewrites outside of the htaccess file ?
Maybe they are referring to the point that Windows doesn't like .htaccess because it starts will a "."
I can save .htaccess correctly with context - www.context.cx - probably the same with most text editors except notepad?
err...if you want the functionality of mod_rewrite on IIS then I suppose that's another question - I'm sure I read that you can. Or just switch to a host with Apache.Comment
-
I instaled the mod rewrite feature for IIS. Now I am trying to use it and cannot get to work
.
Example:
I want the mod rewrite to execute
www.mysite.com/results.php?use r=20
when a user types in the following:
www.mysite.com/user20/
Is this the correct code to get this to work ?
Code(php):
RewriteEngine on
RewriteRule ^([.*])/$ results.php?use r=$1 [L]Comment
Comment