FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


URL rewrite (Apache)





imagefree
I am having this in my apache errors log
(i am using windows XP, and XAMPP on it)

Code:
[Wed Oct 29 00:48:41 2008] [alert] [client 127.0.0.1] D:/xampp/htdocs/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration, referer: http://localhost/WEBSITE/pages/44/


This is what i have in .htaccess on the root

Code:
RewriteEngine on
RewriteRule ^WEBSITE/pages/([0-9][0-9])/$ /WEBSITE/index.php?url=$1



what may be the solution. It shows 500 Internal Error.
rvec
you have to enable mod_rewrite in the apache config file and restart apache
imagefree
Thanks rvec.
i have found only one file for config in apache dir.
xampp\apache\conf\httpd.conf
Here is just one instance of mod_rewrite
Code:
#LoadModule rewrite_module modules/mod_rewrite.so


Where can i set it to enable.
Peterssidan
# makes the line to a comment. remove the # and see what happens.
rvec
just like described just above that part (or/and at the start of the httpd.conf file)
imagefree
thanks guys, its done.
Thanks again.

One more thing, if i use REwrite rule to redirect att requests of http://www.example.com/ to http://www.example.com/home/, then how to prevent users from opening index.php (http://www.example.com/index.php) and all other publicly accessible php files in the root dir?
Star Wars Fanatic
imagefree wrote:
thanks guys, its done.
Thanks again.

One more thing, if i use REwrite rule to redirect att requests of http://www.example.com/ to http://www.example.com/home/, then how to prevent users from opening index.php (http://www.example.com/index.php) and all other publicly accessible php files in the root dir?


This should work:

RewriteRule ^/(.*) /home/$1

It will redirect /index.php to /home/index.php
imagefree
this rewrite rule is not working. Please help.


Code:
RewriteRule ^ad?([0-9a-zA-Z]+);([0-9a-zA-Z]+);([0-9a-zA-Z]+);([0-9a-zA-Z]+)$ /advertise.php?var1=$1&var2=$2&var3=$3&var4=$4


i am using this URL

Code:
http://localhost/ad?1;1;1;1


please help.
pollux1er
http://fr.mc245.mail.yahoo.com/mc/showFolder?fid=Inbox&.rand=594611503&da=0

is that the kind of url your are talking about?

if yes how to make it!
imagefree
pollux1er wrote:
http://fr.mc245.mail.yahoo.com/mc/showFolder?fid=Inbox&.rand=594611503&da=0

is that the kind of url your are talking about?

if yes how to make it!


please see this thread
http://www.frihost.com/forums/vt-100599.html
I found a reason of this problem, but cant find the solution of next problem.
Related topics
Is it possible to make Mambo CMS searchable in Google?
URL redirectors and search engines
htaccess
Why are you using FRIhost
How to change extension php to html but the php script still
Need Help, how to transfer to files to server using $_GET
Krasnalserv
[help] Ayuda con .htaccess
php instalation:
url rewrite
frihost.com/forums redirect
URL Rewriting
MVC problem
Script Name
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.