Solved

Apache .htaccess question

Posted on 2010-08-28
5
403 Views
Last Modified: 2012-05-10
Hi,

I am getting Page not found after using .htaccess on my site.

I have installed a commercial on my servint.com VPS server.

The script server requirement is support of .htaccess files.

I have uploaded the  .htaccess file to the right place (main folder), code is attached here.

For any reason urls are not redirecting properly and returning page not found. See it live here:
http://www.softnetweb.com/

I opened a ticket on server support and they say:
".htaccess files are already executable on your server. They will function as normal. The problem seems to be with the coding itself."

Script developer support said that may be the AddHandler in the server not enabled.

on the script demo site the SEO friendly urls works perfect.

Why not on my server?
Help!


AddHandler server-parsed .php
<Files ~ "^[^.]+$">
SetHandler application/x-httpd-php
</Files>
AddHandler application/x-httpd-php .php

Open in new window

0
Comment
Question by:Fernanditos
  • 2
  • 2
5 Comments
 
LVL 7

Expert Comment

by:mcuk_storm
ID: 33550202
From the code you have posted it is telling the server to process everything without a file extension as PHP, the problem seems to be that on the site you have given the seo urls i.e. http://www.softnetweb.com/article/seo-articles-the-best-way-to-generate-traffic-to-your-site-79-1.html have .html at the end of them, so they wouldn't match that rule anyway.
0
 

Author Comment

by:Fernanditos
ID: 33550236
hmm, I dont think this is the reason, they are using the same .htaccess on the demo site and files has also .html extensions. It seems to be something on the apache configuration. but, what could be?
0
 
LVL 7

Expert Comment

by:mcuk_storm
ID: 33550281
Well there are no rewrite rules in what you posted so apache will literally be looking for the file http://www.softnetweb.com/article/seo-articles-the-best-way-to-generate-traffic-to-your-site-79-1.html which i'm guessing doesn't exist as i would expect it to extract the info it needs from the url using mod_rewrite, or at least redirect all traffic to a single script to then work out what page to serve based on the SCRIPT_URL/REQUEST_URI. Do you have any rewrite rules in there at the moment that come with the main CMS?
0
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 33552371
Can you describe what you're trying to achieve here?  Just in plain language, not anything technical.  Thanks, ~Ray
0
 

Accepted Solution

by:
Fernanditos earned 0 total points
ID: 33552477
Here the dynamic and seo friendly URLs:

http://www.softnetweb.com/articles.php?art_id=83&start=1
http://www.softnetweb.com/article/how-to-create-a-portfolio-83-1.html

Redirection was not working with the .htaccess from my first post.

The problem has been fixed by modifying the .htaccess code. I attach the right code here, not it works pefect. thank you.

AddHandler server-parsed .php
<Files ~ "^[^\.]+$">
SetHandler application/x-httpd-php5
</Files>
AddHandler application/x-httpd-php5 .php

Open in new window

0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now