Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
mod_rewrite Trouble in .htaccess
Old 04-07-2009, 03:53 PM mod_rewrite Trouble in .htaccess
Average Talker

Posts: 16
Trades: 0
I'm trying to implement search engine-friendly URLs using mod_rewrite. I haven't been able to get it to work yet, so I've been cutting things down to the very basics to try and find the problem. So, here are the entire contents of my .htaccess file:

Code:
RewriteEngine on
RewriteRule ^/archive$ /archive.php
Obviously, I want mydomain.com/archive to point to the file, archive.php. However, I try it out and all I get is this:

Quote:
Not Found
The requested URL /archive was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
I uploaded in ASCII mode and CHMOD'd to 644, like all the tutorials told me and still nothing.

mod_rewrite may be disabled on my server, but I can't think of any plausible reason why it would be.

Help?

Update:
AUGH!!!!
I just had to remove the leading forward slash? GAKLFJDSKGlhasl;kdasfj!

Sorry to trouble you all.

Last edited by Kent O'Matic; 04-07-2009 at 04:05 PM..
Kent O'Matic is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-21-2009, 11:29 AM Re: mod_rewrite Trouble in .htaccess
zeruel's Avatar
Webmaster Talker

Posts: 515
Location: SouthEast
Trades: 0
I got the same problem like yours and up to now, I can't figure it out. My issue is that, the site I am handling has two index pages. one with the index.html and the other is index.php

I can't figure out how to integrate this two site and redirect them to just plain url that look like http://www.domain.com/

I tried out a few other codes and some codes just return an "internal server error"..

Hope I can fix this asap. Just sharing my experience.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
zeruel is offline
Reply With Quote
View Public Profile Visit zeruel's homepage!
 
Old 04-21-2009, 11:45 AM Re: mod_rewrite Trouble in .htaccess
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
What you're describing doesn't actually make the URLs "Search Engine Friendly", but try this:
Code:
RewriteRule archive\/ archive.php [nc]
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 04-25-2009, 04:45 AM Re: mod_rewrite Trouble in .htaccess
nayes84's Avatar
Extreme Talker

Latest Blog Post:
Difference between ASP And JSP
Posts: 232
Name: John
Location: Tokyo
Trades: 0
may be the problem is with the slash
try
Code:
RewriteEngine on
RewriteRule ^archive$ archive.php
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

if(I'm("Helpful")) Add_Talkupation("nayes84");
nayes84 is offline
Reply With Quote
View Public Profile
 
Old 05-25-2009, 10:20 PM Re: mod_rewrite Trouble in .htaccess archive
Junior Talker

Posts: 3
Trades: 0
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^archive.*$ archive.php [L]
marxfinder is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to mod_rewrite Trouble in .htaccess
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.41257 seconds with 12 queries