473,411 Members | 2,272 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

Mod Rewrites

16
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 ?
Feb 27 '08 #1
8 1099
Markus
6,050 Expert 4TB
Do you have to purchase this 'software' from them?

Robbing %#!"#!%

Unfortuantely, i have not heard of any other way of achieving mod_rewrites outside of htaccess.

Hopefully someone else has!
Feb 27 '08 #2
ronverdonk
4,258 Expert 4TB
I have no experience with rewrite outside Apache, but I found an entry in the phpclasses.org site, where the developer claims that it works with and without Apache. So have look HERE and see if it is useable for you.

Ronald
Feb 27 '08 #3
phpmind
16
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.
Feb 29 '08 #4
phpmind
16
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?user=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?user=1
Feb 29 '08 #5
Markus
6,050 Expert 4TB
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?user=1
It would indeed.
Just use
[php]
$_GET['user'];
[/php]
To retrieve it.
Feb 29 '08 #6
henryrhenryr
103 100+
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 ?
I use windows and apache (local) and linux/apache (live) and I use .htaccess.

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.
Feb 29 '08 #7
phpmind
16
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?user=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?user=$1 [L]
Mar 4 '08 #8
phpmind
16
I did get this working but one problem I am having is it pulls up the page ok but the header and footer do not look correct. Does the htaccess file have to exist in subfolders for files that are not in the root directory. How is this handled ?
Mar 4 '08 #9

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

Similar topics

47
by: Jeff Relf | last post by:
Hi All, I plan on using the following C++ code to create nodes with unlimited children: // I would like to declare NodeT like this, // but it won't compile because Lnk_T is not defined yet....
2
by: rked | last post by:
I get nameSPAN1 is undefined when I place cursor in comments box.. <%@ LANGUAGE="VBScript" %> <% DIM ipAddress ipAddress=Request.Servervariables("REMOTE_HOST") %> <html> <head> <meta...
4
by: | last post by:
I have earlier used an HttpModule that did URL rewrites on the BeginRequest event. Now I am trying to use the same module in a different application on a new and upgraded machine (winxp sp2). ...
0
by: Graham | last post by:
Hi I posted this q last week, Stefano had an answer but unfortunately it would only work if I was specifying the stylesheet reference directly; in this case it is the ASP.NET 2 theme process...
7
by: Andrew | last post by:
hi All, is it possible to do this? for instance: http://www.domain.com/pdisplay.php?page=p2/ps2antigrav&type=htm to http://www.domain.com/ps2antigrav.html and
3
by: Smokey Grindel | last post by:
I am using ASP.NET 2.0 and know about the static list in the web.config for URL rewriting, but my list is dynamic and I am running into some problems... 1) How do you get URL rewriting to work in...
1
by: M | last post by:
On our site we have contentitems which suppose to be embedded in a productsheet. My idea is to check the URL to see if the item is opened the way it should. EG: the URL...
4
by: Klaus Jensen | last post by:
Hi I created code to allow me to rewrite urls from global.asax, so that if the incoming Url is for instance: /Hats/ReallyCoolHat.aspx ....I look up ReallyCoolHat in the products table and...
44
risk32
by: risk32 | last post by:
Hello all. As I am just a sapling according to the world of programming, I've come across what I thought would have been sufficient at the task I needed. Only problem... inter-twining Javascript and...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.