| Author |
|
forum99 Newbie

Joined: 06 June 2008 Location: United Kingdom
Online Status: Offline Posts: 7
|
| Posted: 08 June 2008 at 8:46am | IP Logged
|
|
|
Hi, Im new to this rewrite method.
I have a asp website with dynamic URLs. Kindly let me know how can I rewrite then as static.
|
| Back to Top |
|
| |
Anton Moderator Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 4695
|
| Posted: 09 June 2008 at 8:32am | IP Logged
|
|
|
Please see examples here: http://www.helicontech.com/isapi_rewrite/doc/examples.htm
__________________ Regards,
Anton
|
| Back to Top |
|
| |
forum99 Newbie

Joined: 06 June 2008 Location: United Kingdom
Online Status: Offline Posts: 7
|
| Posted: 10 June 2008 at 4:09am | IP Logged
|
|
|
sorry I dont understand.
Kindly do it .. http://www.mysite.com/view_colleges.php?c_id=1
I want it to http://www.mysite.com/university-of-wolverhampton/ OR http://www.mysite.com/university-of-wolverhampton.php
Please help me.
|
| Back to Top |
|
| |
Anton Moderator Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 4695
|
| Posted: 11 June 2008 at 5:09am | IP Logged
|
|
|
The rule should be:
RewriteBase / RewriteRule ^university-of-wolverhampton/?$ view_colleges.php?c_id=1 [NC,L]
__________________ Regards,
Anton
|
| Back to Top |
|
| |
forum99 Newbie

Joined: 06 June 2008 Location: United Kingdom
Online Status: Offline Posts: 7
|
| Posted: 11 June 2008 at 7:44am | IP Logged
|
|
|
Ok .
RewriteBase / RewriteRule ^university-of-wolverhampton/?$ view_colleges.php?c_id=1 [NC,L]
Where should I add this code in order to get the final result?
|
| Back to Top |
|
| |
Sergey Moderator Group

Joined: 11 March 2005
Online Status: Offline Posts: 712
|
| Posted: 19 June 2008 at 9:13am | IP Logged
|
|
|
Put this rule in "C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf" or .htaccess file in the root site directory .
You can use HeliconManager or any other text editor.
|
| Back to Top |
|
| |
forum99 Newbie

Joined: 06 June 2008 Location: United Kingdom
Online Status: Offline Posts: 7
|
| Posted: 20 June 2008 at 12:17am | IP Logged
|
|
|
Thanks Sergey,
I have 5 dynamic url like this. You said the above rule need to be created and uploaded into root directory.
The above rule is for one URL. Should I created rule for other URLs ? And should I include all rules into one htaccess file??
Every time I need to write RewriteBase / or it's one time?
Is t require to put RewriteEngine On ?
Kindly let me know
|
| Back to Top |
|
| |
forum99 Newbie

Joined: 06 June 2008 Location: United Kingdom
Online Status: Offline Posts: 7
|
| Posted: 20 June 2008 at 12:25am | IP Logged
|
|
|
One more thing I would like to add. Is the above rule you have suggested for PHP website? Because this is a Apache Based PHP website.
|
| Back to Top |
|
| |
Sergey Moderator Group

Joined: 11 March 2005
Online Status: Offline Posts: 712
|
| Posted: 20 June 2008 at 4:50am | IP Logged
|
|
|
#.htaccess
RewriteEngine On
RewriteBase /
RewriteRule ^university-of-wolverhampton/?$ view_colleges.php?c_id=1 [NC,L]
RewriteRule ...
RewriteRule ...
RewriteRule ...
RewriteRule ...
|
| Back to Top |
|
| |
forum99 Newbie

Joined: 06 June 2008 Location: United Kingdom
Online Status: Offline Posts: 7
|
| Posted: 24 June 2008 at 3:46am | IP Logged
|
|
|
OK. Thanks Sergey,
Now I should create a .htaccess file using above code and upload into root directory , in order to rewrite all 5 dynamic URLs ??
|
| Back to Top |
|
| |
Anton Moderator Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 4695
|
| Posted: 27 June 2008 at 7:43am | IP Logged
|
|
|
Can you please clarify your requirements in the last post.
__________________ Regards,
Anton
|
| Back to Top |
|
| |
forum99 Newbie

Joined: 06 June 2008 Location: United Kingdom
Online Status: Offline Posts: 7
|
| Posted: 30 June 2008 at 1:11am | IP Logged
|
|
|
Actually I want rewrite my web page url.
So I wanted to be confirmed that the example given by Sergey above is the final one to create a htaccess an upload into root directory ?
|
| Back to Top |
|
| |
Anton Moderator Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 4695
|
| Posted: 01 July 2008 at 3:45am | IP Logged
|
|
|
You mentioned that you have 5 dynamic urls. but you have provided only one specific example. The rule for that example was provided by Sergey. The rules for the rest of the urls should be written in a similar way. If you provide specific examples of what you want to rewrite and how, we will create rules for you.
__________________ Regards,
Anton
|
| Back to Top |
|
| |