.htaccess file not working as intended
Posted by: StarkHunter (47.29.5.---)
Date: August 20, 2017 01:53PM

Hi.

I am currently working on a project where I have created a Virtual Host called 'stories.com'. The htaccess file that I have created doesn't work as intended.

My htaccess file looks like this:


RewriteEngine on

RewriteBase /

RewriteRule ^help/([A-Za-z]+)$ help.php?type=$1


But when I visit it with my browser, it tells me that it cannot find 'index: type', but when I change the name of the directory with something other than the original file name, it works fine. Example:


RewriteRule ^showHelp/([A-Za-z]+)$ help.php?type=$1

The above links to 'stories.com/showHelp/about' and it the php works fine with that.

How do I fix this?

Thanks.

P.S: I have not changed or edited any of the pre-provided code of httpd.conf or any other file.



Edited 1 time(s). Last edit at 08/20/2017 01:54PM by StarkHunter.

Options: ReplyQuote
Re: .htaccess file not working as intended
Posted by: Otomatic (Moderator)
Date: August 20, 2017 02:27PM

Hi,

This question is not On Topic
This site is for people having issues getting WAMPServer running and not a general HOW DO I site for everything web related.

See Apache Documention about rewrite rules [httpd.apache.org]

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote


Sorry, only registered users may post in this forum.