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


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?


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


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]

Wampserver 3.1.9 32 bit - Apache 2.4.41 - PHP 7.3.8/7.2.21/7.1.31/7.0.33/5.6.40 - MySQL 5.7.27 - MariaDB 10.3.16
Wampserver 3.1.9 64 bit - Apache 2.4.41 - PHP 7.3.8/7.2.21/7.1.31/7.0.33/5.6.40 - MySQL 5.7.27/8.0.17 - MariaDB 10.3.16
PhPMyadmin - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote

Sorry, only registered users may post in this forum.