UK WEB HOSTING FORUM FOR DISCUSSION ON WEB HOSTING SERVICE AND SUPPORT
LINUX HOSTING WINDOWS HOSTING PACKAGES SHOPPING CART OSCOMMERCE ZEN CART AGORA
ECOMMERCE HOSTING ASP MSSQL FRONTPAGE HOSTING PHP MYSQL HOSTING DISCUSSION FORUM
CPANEL RESELLER HOSTING DEDICATED SERVER VPS HOSTING PLESK VIRTUOZZO
Quick Search
Your forum announcement here!

  UK Web Hosting | Dedicated Server Windows and Linux VPS Forum > Technical Support > cPanel Shared Hosting

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-06-2007, 22:43
WelshTom's Avatar
Moderator
 
Join Date: May 2007
Location: Newport, Wales
Posts: 820
Send a message via AIM to WelshTom Send a message via MSN to WelshTom Send a message via Yahoo to WelshTom
Default mod_rewrite doing my head in :P

Hi

First of all, I'm going to show you what I'm trying to achieve.

On top of the wordpress rewrite rule to change index.php?p=1 to /category/blah

Wordpress rule:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

I also want to rewrite all my php files, (like about.php) to about, and contact.php to contact etc.

I know mod_rewrite is a pain, but hope someone can help
__________________
Thomas Williams
Founder of TWR Web Design
http://www.twrwebdesign.co.uk/
Reply With Quote
  #2 (permalink)  
Old 10-06-2007, 10:51
Junior Member
 
Join Date: Jun 2007
Posts: 18
Default

I think the following rules will work

for index.php?p=1 to /category/blah use following rule
RewriteRule ^category/(.*)$ index.php?p=$1

for contact.php & about.php
RewriteRule ^about$ about.php
RewriteRule ^contact$ contact.php

If you want to hide the php extensions of all the files then
RewriteRule ^(.*)$ $1.php
Reply With Quote
  #3 (permalink)  
Old 10-06-2007, 13:02
WelshTom's Avatar
Moderator
 
Join Date: May 2007
Location: Newport, Wales
Posts: 820
Send a message via AIM to WelshTom Send a message via MSN to WelshTom Send a message via Yahoo to WelshTom
Default

The RewriteRule ^contact$ contact.php rule works fine, but only as long as I don't have the rewrite rules which wordpress has which is:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

I want to allow to have the above rule, aswell as allowing contact.php to be renamed to contact.

Here is the one which DOESN'T work:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteRule ^contact$ contact.php
__________________
Thomas Williams
Founder of TWR Web Design
http://www.twrwebdesign.co.uk/
Reply With Quote
  #4 (permalink)  
Old 13-06-2007, 10:04
WelshTom's Avatar
Moderator
 
Join Date: May 2007
Location: Newport, Wales
Posts: 820
Send a message via AIM to WelshTom Send a message via MSN to WelshTom Send a message via Yahoo to WelshTom
Default

Just bumping the topic
__________________
Thomas Williams
Founder of TWR Web Design
http://www.twrwebdesign.co.uk/
Reply With Quote
  #5 (permalink)  
Old 15-06-2007, 07:58
DPS Computing's Avatar
Premium Member
 
Join Date: Apr 2007
Location: Manchester, United Kingdom
Posts: 4,863
Send a message via ICQ to DPS Computing Send a message via AIM to DPS Computing Send a message via MSN to DPS Computing Send a message via Yahoo to DPS Computing Send a message via Skype™ to DPS Computing
Default

As it is a very technical subject it may unfortunately take a while to get some answers Thomas .

Hope that someone is able to help you soon .
__________________
David Smith
DPS Computing
http://www.dpscomputing.com (Computing, Reviews, News) - New site / new polls / new stories! With many more to follow!
NEW LAUNCH! http://djdavid.dpscomputing.com (My DJ Website)
NEW LAUNCH! http://davidsmith.dpscomputing.com (My Personal Website)
Reply With Quote
  #6 (permalink)  
Old 16-06-2007, 14:28
WelshTom's Avatar
Moderator
 
Join Date: May 2007
Location: Newport, Wales
Posts: 820
Send a message via AIM to WelshTom Send a message via MSN to WelshTom Send a message via Yahoo to WelshTom
Default

Quote:
Originally Posted by DPS Computing View Post
As it is a very technical subject it may unfortunately take a while to get some answers Thomas .

Hope that someone is able to help you soon .
I've posted a message on the wordpress forums and they are looking into it, I hope it gets resolved soon.
__________________
Thomas Williams
Founder of TWR Web Design
http://www.twrwebdesign.co.uk/
Reply With Quote
  #7 (permalink)  
Old 16-06-2007, 14:33
DPS Computing's Avatar
Premium Member
 
Join Date: Apr 2007
Location: Manchester, United Kingdom
Posts: 4,863
Send a message via ICQ to DPS Computing Send a message via AIM to DPS Computing Send a message via MSN to DPS Computing Send a message via Yahoo to DPS Computing Send a message via Skype™ to DPS Computing
Default

Quote:
Originally Posted by Thomas View Post
I've posted a message on the wordpress forums and they are looking into it, I hope it gets resolved soon.
Good luck with finding the answer .
__________________
David Smith
DPS Computing
http://www.dpscomputing.com (Computing, Reviews, News) - New site / new polls / new stories! With many more to follow!
NEW LAUNCH! http://djdavid.dpscomputing.com (My DJ Website)
NEW LAUNCH! http://davidsmith.dpscomputing.com (My Personal Website)
Reply With Quote
  #8 (permalink)  
Old 18-06-2007, 07:26
Junior Member
 
Join Date: Jun 2007
Posts: 18
Default

Hi Thomas,

I have tried a lot on your issue but can't not found the solution for it. I went through the wordpress forum also but as they suggested the solution it doesn't work.

So if you get the solution from Wordpress please post the solution here on the forum.
Reply With Quote
  #9 (permalink)  
Old 18-06-2007, 10:14
DPS Computing's Avatar
Premium Member
 
Join Date: Apr 2007
Location: Manchester, United Kingdom
Posts: 4,863
Send a message via ICQ to DPS Computing Send a message via AIM to DPS Computing Send a message via MSN to DPS Computing Send a message via Yahoo to DPS Computing Send a message via Skype™ to DPS Computing
Default

Yes as it always good to build up a database of answers (such as in a forum) especially if they are complex questions as these are the ones that can sometimes frustrate people .
__________________
David Smith
DPS Computing
http://www.dpscomputing.com (Computing, Reviews, News) - New site / new polls / new stories! With many more to follow!
NEW LAUNCH! http://djdavid.dpscomputing.com (My DJ Website)
NEW LAUNCH! http://davidsmith.dpscomputing.com (My Personal Website)
Reply With Quote
  #10 (permalink)  
Old 18-06-2007, 12:17
WelshTom's Avatar
Moderator
 
Join Date: May 2007
Location: Newport, Wales
Posts: 820
Send a message via AIM to WelshTom Send a message via MSN to WelshTom Send a message via Yahoo to WelshTom
Default

Quote:
Originally Posted by DPS Computing View Post
Yes as it always good to build up a database of answers (such as in a forum) especially if they are complex questions as these are the ones that can sometimes frustrate people .
I'll add it to the Knowledgebase if I find multiple users are experiencing the same problem.
__________________
Thomas Williams
Founder of TWR Web Design
http://www.twrwebdesign.co.uk/
Reply With Quote
  #11 (permalink)  
Old 19-06-2007, 13:00
DPS Computing's Avatar
Premium Member
 
Join Date: Apr 2007
Location: Manchester, United Kingdom
Posts: 4,863
Send a message via ICQ to DPS Computing Send a message via AIM to DPS Computing Send a message via MSN to DPS Computing Send a message via Yahoo to DPS Computing Send a message via Skype™ to DPS Computing
Default

Quote:
Originally Posted by Thomas View Post
I'll add it to the Knowledgebase if I find multiple users are experiencing the same problem.
That would be a great idea Thomas .
__________________
David Smith
DPS Computing
http://www.dpscomputing.com (Computing, Reviews, News) - New site / new polls / new stories! With many more to follow!
NEW LAUNCH! http://djdavid.dpscomputing.com (My DJ Website)
NEW LAUNCH! http://davidsmith.dpscomputing.com (My Personal Website)
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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


All times are GMT. The time now is 10:59.

 

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by Web Hosting 3.1.0
Copyright © 2001-2008, eUKhost.com. All rights reserved.

 
Site Map

VPS Hosting
VPS Hosting plans

Dedicated Server Hosting
Dedicated Server plans

Business Web Hosting
100% uptime Hosting

Cpanel Hosting
cPanel Shared Hosting

Reseller Hosting
Reseller Web Hosting

Windows Hosting
Windows Shared Hosting

Windows VPS

Windows VPS Hosting

Semi Dedicated Servers
Semi-Dedicated Hosting

Dedicated Server Mirroring
Dedicated Server Mirroring

Webhosting Knowledgebase
Frequently asked Questions

Web Hosting Blog
eUKhost Blog

Web Hosting Support
Support Helpdesk

UK Data Center
eUKhost Datacenter

Web Hosting Forum
eUKhost Forum

Support Tutorials
Online Flash Tutorials

Offsite Back-up Plans
Remote Backup Service

Customer Testimonials
eUK Customer Testimonials


knowledgebase articles

eUKhost.com Services

Pre-Sales Questions
Pre-sales FAQ's

Domain Names
Domain registration FAQ's

cPanel Hosting
cPanel Hosting FAQ's

Windows Web Hosting
Plesk Control Panel

Reseller Hosting
Reseller Hosting FAQ's

VPS Hosting
Virtual Private Server

Semi-Dedicated Servers
Semi-Dedicated FAQ's

Dedicated Servers
Dedicated Server Hosting


popular blog categories


Web Hosting
Website Hosting articles

UK Web Hosting
UK Hosting articles

Dedicated Server Hosting
Dedicated Server guidelines

VPS Hosting
VPS hosting articles

cPanel Hosting
cPanel Hosting articles

Linux Operating System
Linux Operating techniques

Windows Web Hosting
Windows plesk articles