TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   General (http://www.talkphp.com/general/)
-   -   Is this valid mod_rewrite (http://www.talkphp.com/general/3085-valid-mod_rewrite.html)

Orc 07-08-2008 01:32 PM

Is this valid mod_rewrite
 
Code:

RewriteRule ^([A-Za-z0-9].*?)/?$ $1.php [L]

Its for my host.. v-v

delayedinsanity 07-08-2008 01:48 PM

It's valid. What is your goal though, so we can tell you if there's any other possible ways?
-m

Orc 07-08-2008 02:03 PM

Not a goal at all actually, just double checking with everyone else to see if this is valid for my host to fix my mod_rewrite, cause I can enable it, just not write any rules or conditions.

xenon 07-08-2008 06:24 PM

What do you need to fix? If you enabled mod_rewrite but you have no rules in your .htaccess file, then the host will act like it was before. It doesn't change anything by itself. Plus, when using mod_rewrite you NEED to have a goal. That's why you enabled it in the first place, to do something with it, not to just have it there...right?

Kalle 07-09-2008 01:29 AM

Have you enabled it like?

Code:

Options +FollowSymLinks All -Indexes
RewriteEngine on

#rewrite rules comes here


Orc 07-09-2008 01:33 AM

Tried that, didn't work, still internal server error. My apache version is 1.3.41

delayedinsanity 07-09-2008 02:09 AM

You might not have rights to change Options in your .htaccess. Confirm with your sysadmin that 'AllowOverride Options' is set for your virtual host. Then try removing everything from your .htaccess but the following (same as Kalle said, minus any rules):

Code:

Options +FollowSymLinks
RewriteEngine On

If you have that in your .htaccess and you get an internal server error, then mod_rewrite isn't properly enabled in Apache. Your sysadmin needs to uncomment the following line and reboot the server:

Code:

#LoadModule rewrite_module modules/mod_rewrite.so


All times are GMT. The time now is 02:01 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0