Mod_Rewrite Request

This is a discussion on "Mod_Rewrite Request" within the PHP Forum section. This forum, and the thread "Mod_Rewrite Request are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jun 5th, 2006, 18:26
Junior Member
Join Date: May 2006
Age: 22
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Mod_Rewrite Request

Hi,

My client has asked me to change his website catalogue from dynamic to static URLs, only i do not understand how to use the mod_rewrite feature, nor do i understand any of the tutorials. I was wondering if someone would be willing to help me out to get this task done, either on a paid in cash basis, or on some either future favours, free hosting, design work or some other sort of "favour-related" deal.

The website in question is www.aneye4style.com. either any advice or help is very VERY appreciated!
Reply With Quote

  #2 (permalink)  
Old Jun 6th, 2006, 05:17
Reputable Member
Join Date: Jul 2005
Location: Melksham, Wilts, UK
Posts: 293
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Mod_Rewrite Request

Andy,

Most of the mod_rewrite examples that I've seen tend to be overcomplex - I know how you feel - so here's a simple "starter" example, and it may be all you need

I'm using the mod in some of our directories - in one, I want all .html files requested to be diverted to /share/index.php4 with a GET parameter of "pagename" set to the name of the HTML file.

In the .htaccess file of the directory in which I want this diversion, I have placed

Code: Select all
RewriteEngine On
RewriteRule ^(.*)\.html /share/index.php4?pagename=$1
and that does the whole job.

-- Graham
Reply With Quote
  #3 (permalink)  
Old Jun 7th, 2006, 14:13
Junior Member
Join Date: May 2006
Age: 22
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Mod_Rewrite Request

Hi Grahame,

thanks for the example, i totally understand how it works now...ive read about 8 tutorials and its all just too complicated. what you said has given me the idea on how to do it...which ive followed and uploaded it in a htaccess file, but the site runs as if it doesnt even exist...what am i doing wrong?, can i pay you to take a look and get it working for me?
Reply With Quote
  #4 (permalink)  
Old Jun 9th, 2006, 03:46
Reputable Member
Join Date: Jul 2005
Location: Melksham, Wilts, UK
Posts: 293
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Mod_Rewrite Request

Andy, Perhaps web server is set up to restrict you, and partly or whole-ly disallows .htaccess files. If you're running your own server, then you'll need to ensure that the AllowOverride directive in the main server configuration file (httpd.conf) is sufficiently open. If someone runs the server for you, you'll have to ask them ....

Here's what I have in my local test server, mirroring what my ISP provides on my live site:

Code: Select all
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
 AllowOverride All

Last edited by grahame; Jun 9th, 2006 at 03:48.
Reply With Quote
  #5 (permalink)  
Old Jun 9th, 2006, 11:59
Junior Member
Join Date: May 2006
Age: 22
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Mod_Rewrite Request

hi grayham, thanks for your post again mate. i spoke to my web host and he told me that mod_rewrite is fully enabled, also i set up an test Mod_rewrite redirect the other day, and that worked fine...its becomine a bit of a pain....if i pay you, and give you access would you be interested in getting it wokring for me pl,ease?
Reply With Quote
  #6 (permalink)  
Old Jun 10th, 2006, 06:05
Reputable Member
Join Date: Jul 2005
Location: Melksham, Wilts, UK
Posts: 293
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Mod_Rewrite Request

I'm quite happy for you to email me and send me a copy of your .htaceess - follow this link for my details. It's probably not going to take too long for me to look at - scarcely worth setting up all the claptrap of any form of financial arrangement. And I would prefer to leave YOU to do the placing / testing on your live server - I reallly don't like accumulating other people's passwords!
Reply With Quote
Reply

Tags
mod_rewrite, request

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mod_rewrite ??? Blake121 PHP Forum 7 Jul 17th, 2007 16:33
Help with Mod_Rewrite swiftmed Web Page Design 3 Jun 7th, 2006 22:17


All times are GMT. The time now is 08:23.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43