[HELP] .htacces [HELP]

Status
Not open for further replies.

Sean

‫‫‫‫‫‫  ‫  Don't Worry, Be Happy
Dec 12, 2011
1,121
405
Having some problems with .htaccess!

Here is my situation.

I am loading all my pages through the index page, so instead of my URL being:


It is:


I am using htaccess to make this URL clean so with htaccess just now I have gotten it to be



Now my aim is to get rid of the .php extension from that link to make it simply:


Here is my htaccess code just now making it


Code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteCond %{REQUEST_URI} !/$
RewriteRule (.*) $1\.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,637
2,389
If you want it so it is like
Code:
http://localhost/index/home

I think the code should be

Code:
RewriteEngine On
RewriteRule ^/index/(.*)$ index.php?page=$1 [NE]
 

Sean

‫‫‫‫‫‫  ‫  Don't Worry, Be Happy
Dec 12, 2011
1,121
405
That worked :up:

Thankyou very much, you can close the thread now
 
Status
Not open for further replies.

Users who are viewing this thread

Top