Solved

Apache .htaccess question

Posted on 2010-08-28
5
412 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 110

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

739 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