Mod rewrite is not Enable

Status
Not open for further replies.

stpvoice

Community Support Rep
Community Support
Messages
5,987
Reaction score
212
Points
63
Hello,

It is enabled. What error(s) do you receive? Could you elaborate a bit? Also, please post the code you are currently using.
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Might also help to post under a Forum account that has Free Hosting Account attached.
 

mathkas39

New Member
Messages
5
Reaction score
0
Points
0
this is the code


<IfModule mod_rewrite.c>
RewriteEngine on

Rewriterule ^blog/(.+)/(.+).html$ ./blog/view/blog.php?page=$1&mode=$2 [NC]
Rewriterule ^blog/(.+).html$ ./blog/blog.php?page=$1 [NC]
Rewriterule ^blog/(.+)/$ ./blog/view/blog.php?page=$1 [NC]
Rewriterule ^blog/$ ./blog/blog.php [NC]

RewriteCond %{REQUEST_FILENAME} !-f
Rewriterule ^blog/(.+)/(.+)$ ./blog/view/blog.php?page=$1&mode=$2 [NC]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^blog/(.+)$ ./blog/blog.php?page=$1 [NC]
</IfModule>
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
You get errors? If so, what?

For one thing, you should have the line

RewriteBase /

just under

RewriteEngine on
 

stpvoice

Community Support Rep
Community Support
Messages
5,987
Reaction score
212
Points
63
Hello,

Please try:
Code:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /

Rewriterule ^blog/(.+)/(.+).html$ ./blog/view/blog.php?page=$1&mode=$2 [NC]
Rewriterule ^blog/(.+).html$ ./blog/blog.php?page=$1 [NC]
Rewriterule ^blog/(.+)/$ ./blog/view/blog.php?page=$1 [NC]
Rewriterule ^blog/$ ./blog/blog.php [NC]

RewriteCond %{REQUEST_FILENAME} !-f
Rewriterule ^blog/(.+)/(.+)$ ./blog/view/blog.php?page=$1&mode=$2 [NC]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^blog/(.+)$ ./blog/blog.php?page=$1 [NC]
</IfModule>

Added RewriteBase / under RewriteEngine on.
 

stpvoice

Community Support Rep
Community Support
Messages
5,987
Reaction score
212
Points
63
No problem. Resolved. Closed.
If you have any further issues please open a new ticket.
 
Status
Not open for further replies.
Top