Jump to content

[SOLVED] .htaccess problems


blueman378

Recommended Posts

ht access problems

 

hi guys, heres what my .htaccess file looks like

 

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^test/([^/]+) /index.php?text=$1 [NC]

 

my directory structure is

 

-www directory

--test

---index.php

 

the index.php file contains:

<?php echo $_GET['text']; ?>

 

now what im wanting is if say i visit localhost/test/hello

 

the php page wil display hello, but instead i get page not found, any ideas?

Link to comment
https://forums.phpfreaks.com/topic/144579-solved-htaccess-problems/
Share on other sites

If everything's inside the directory /test try this...

 

Options +FollowSymlinks
RewriteEngine on
RewriteBase /test/
RewriteRule ^([^/]+)$ index.php?text=$1 [NC]

 

Or

 

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^test/([^/]+)$ test/index.php?text=$1 [NC]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.