hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : Mod_rewrite - clean url help
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

Mod_rewrite - clean url help

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 02-11-2010, 09:31 PM
sketchydot sketchydot is offline
New Member
 
Join Date: Feb 2010
Posts: 2

Mod_rewrite - clean url help


Hi all,

I am desperately struggling, ive been trying for weeks to get my site, running on wordpress to be able to get clean urls.

I have a dedicated apache CentOS server.

now ive set the permalink structure as i want but it gives me the error

"If your .htaccess file were writable, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your .htaccess file."

it tells me to add this..

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


done that, doesnt work!

My httpd.conf HAS mod_rewrite enabled i just cant figure out what to do!

can anyone help?
greatly apprciated

Reply With Quote


Sponsored Links
  #2  
Old 02-11-2010, 10:53 PM
Doh004 Doh004 is offline
Web Hosting Guru
 
Join Date: Jan 2004
Location: NJ, USA
Posts: 288
Quote:
Originally Posted by sketchydot View Post
Hi all,

I am desperately struggling, ive been trying for weeks to get my site, running on wordpress to be able to get clean urls.

I have a dedicated apache CentOS server.

now ive set the permalink structure as i want but it gives me the error

"If your .htaccess file were writable, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your .htaccess file."

it tells me to add this..

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


done that, doesnt work!

My httpd.conf HAS mod_rewrite enabled i just cant figure out what to do!

can anyone help?
greatly apprciated
You have to change your permissions on your .htaccess file in your wordpress installation. You can do this in the shell, or in your FTP program. Just CHMOD it to 777.

__________________


Reply With Quote
  #3  
Old 02-12-2010, 03:23 AM
Dr:linux Dr:linux is offline
Junior Guru Wannabe
 
Join Date: Aug 2008
Location: In the shell...
Posts: 90
Check the Apache error logs

Are you getting any error messages. Please check the Apache error logs for troubleshooting. If you are getting any error logs please paste it.

Reply With Quote
Sponsored Links
  #4  
Old 02-12-2010, 04:05 AM
HivelocityDD HivelocityDD is offline
WHT Addict
 
Join Date: Apr 2009
Location: localhost
Posts: 174
In your .htaccess file add this lines

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

__________________
Dedicated Servers - sales@hivelocity.net - 1-888-869-HOST(4678)
Award winning Managed Hosting - Dedicated Server Hosting
Managed Dedicated Servers. Reseller Discounts. 24/7 Impressive Tech Support.

Reply With Quote
  #5  
Old 02-12-2010, 04:49 AM
SlavaT SlavaT is offline
Newbie
 
Join Date: Feb 2010
Posts: 15
Try to change
RewriteRule . /index.php [L]
to
RewriteRule ^$ index.php

Reply With Quote
  #6  
Old 02-12-2010, 07:36 AM
sketchydot sketchydot is offline
New Member
 
Join Date: Feb 2010
Posts: 2
WOW thank doh004 that worked perfectly!

now, my server is returning two errors, not sure if they are connected but the log file is showing up these...

[client ::1] Directory index forbidden by Options directive: /var/www/html/

and

postdrop: warning: unable to look up public/pickup: No such file or directory

and

[client 222.236.47.185] File does not exist: /var/www/html/phpmyadmin

Any ideas?

thanks again guys,you saved my sanity!

Reply With Quote
  #7  
Old 02-12-2010, 08:00 AM
SlavaT SlavaT is offline
Newbie
 
Join Date: Feb 2010
Posts: 15
Check the permissions of /var/www/html/ directory. Also check files and subdirectories of this directory.

Reply With Quote
  #8  
Old 02-15-2010, 01:00 AM
DashV DashV is offline
Junior Guru Wannabe
 
Join Date: Feb 2010
Location: /usr/local/
Posts: 37
First, never chmod your files 777 unless you *really* need everyone to write to them
Second, make sure that your VHost or Apache configuration has: AllowOverride with a value like "all" or "AccessFileName" to have Apache pickup your .htaccess file.

Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
mod_rewrite help needed - how to substitute a URL? mrzippy Programming Discussion 1 08-01-2008 11:30 PM
Split URL using Mod_rewrite branall1 Hosting Security and Technology 3 05-22-2006 06:32 PM
mod_rewrite url rewriting. lachtan Hosting Security and Technology 3 02-18-2005 03:53 PM
mod_rewrite URL redirect scott79 Hosting Security and Technology 0 12-09-2004 01:41 PM
mod_rewrite fun, getting variables from url daveman Programming Discussion 1 05-06-2003 04:24 AM

Related posts from TheWhir.com
Title Type Date Posted
Facebook Aims for 25 Percent Renewable Energy Sources in Data Centers by 2015 Web Hosting News 2012-08-02 16:12:20
Web Host WebHostForASP.net Launches VPS Hosting Service Web Hosting News 2012-06-29 14:52:22
Google Clean Energy Guru Weihl Joining Facebook Web Hosting News 2011-12-20 15:53:32
Facebook and Greenpeace Make Peace on Renewable Energy Web Hosting News 2011-12-15 17:36:21
Communications Software Firm 4PSA Launches Plesk Panel Add-Ons Web Hosting News 2011-10-27 22:19:07


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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 Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?