Jump to content

Rewrite Not Working


znaji
Go to solution Solved by PravinS,

Recommended Posts

Hi

 

Rewrite rules will not work on cheap hosted godaddy server however rewrite works locally. Can someone le me know whats wrong or the right way please.

 

Working locally but not hosted.

 

RewriteEngine on
RewriteBase /

RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

#AddType application/x-httpd-php .php5 .php4 .php .php3 .php2 .phtml
#AddHandler x-httpd-php5-3  .php

RewriteRule ^profile/([a-zA-Z0-9_-]+)/comment/([0-9]+) statusview.php?s=$2&user=$1
RewriteRule ^profile/([a-zA-Z0-9_-]+)/notifications notifications.php?userid=$1
RewriteRule ^profile/([a-zA-Z0-9_-]+) profile.php?id=$1
RewriteRule ^create-account create-account.php
RewriteRule ^forgot-password forgot-password.php
RewriteRule ^about about.php
RewriteRule ^privacy privacy.php
RewriteRule ^terms-of-service terms-of-service.php
RewriteRule ^contact contact.php
RewriteRule ^login login.php
RewriteRule ^([a-z_-]+)/([a-z0-9_-]+)/([0-9]+) comment.php?subcat=$3
RewriteRule ^category/([a-zA-Z_-]+) category.php?cat=$1
RewriteRule ^how-it-works how-it-works.php
RewriteRule ^updates updates.php

 

Link http://www.example.com/profile/john does not work have to use

http://www.example.com/profile.php?id=john

to test.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.