webdevRefinery Forum: .htaccess Problem - webdevRefinery Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

User is offline Rizwan 

  • Group: Members
  • Posts: 3
  • Joined: 06-June 12
  • Expertise:HTML,CSS,PHP,Javascript,SQL

Posted 06 June 2012 - 07:08 AM (#1)

.htaccess Problem


Hi all,

I have a problem in .htaccss file. my site is running on localhost finely but not working on live server.

this is url of my site:
http://www.consultmosaic.com/DayBeam/

thanks
Regards:
Rizwan
0


User is online _Sam 

  • Beep Beep
  • Group: Members
  • Posts: 634
  • Joined: 11-March 10
  • LocationZurich, Switzerland
  • Expertise:HTML,CSS

Posted 06 June 2012 - 07:14 AM (#2)

Well I can't see your .htaccess file and the site is displayed to me. So what exactly is not working fine? Some more info and maybe the content of your .htaccess file would be good to get to the bottom of your problem.
(ಠ_ಠ)
0


User is offline Rizwan 

  • Group: Members
  • Posts: 3
  • Joined: 06-June 12
  • Expertise:HTML,CSS,PHP,Javascript,SQL

Posted 06 June 2012 - 07:33 AM (#3)

The error is
"Page Not Found" Errors on every page except homepage.

.htaccsss file code is:


Options +FollowSymlinks
RewriteEngine On
RewriteRule ^home$ index.php?id=1 [L]
RewriteRule ^contact-us$ index.php?id=2 [L]
RewriteRule ^logout$ index.php?id=3 [L]
RewriteRule ^login$ index.php?id=11 [L]
RewriteRule ^signup$ index.php?id=12 [L]
RewriteRule ^contact$ index.php?id=13 [L]
RewriteRule ^daybeam$ index.php?id=14 [L]
RewriteRule ^account-settings$ index.php?id=15 [L]
RewriteRule ^cashout-setting$ index.php?id=16 [L]
RewriteRule ^change-password$ index.php?id=17 [L]
0


User is offline gibbonweb 

  • 兄ヨハネス
  • Group: Members
  • Posts: 2062
  • Joined: 23-June 10
  • LocationMunich(DE)
  • Expertise:HTML,CSS,PHP,Javascript,Python,SQL,Graphics

Posted 06 June 2012 - 08:11 AM (#4)

http://www.consultmo.../index.php?id=2 "kind of works" (it exists but produces other errors)

So I guess the problem is in your rewrite rule itself. From what I can see, it only applies to rewrites on the top level of your domain, whereas your site is in the subdirectory "/DayBeam/". You'll have to change you rewrites around the ^: try either adding your directory name or removing the ^. I'm no htaccess expert so either or none might work ;)
0


User is offline Ruku 

  • I do Linux and that Internet thing.
  • Group: Members
  • Posts: 1350
  • Joined: 17-April 10
  • Location/root
  • Expertise:HTML,CSS,PHP,Javascript,Python,SQL

Posted 06 June 2012 - 08:41 AM (#5)

Hello to you too...

Try using
RewriteBase
:

RewriteBase /DayBeam/

1


User is offline callumacrae 

  • {{ post.author }}
  • Group: Members
  • Posts: 2862
  • Joined: 20-January 11
  • LocationWarwickshire, England
  • Expertise:HTML,CSS,PHP,Javascript,Node.js,SQL

Posted 06 June 2012 - 09:53 AM (#6)

Rizwan, on 06 June 2012 - 07:33 AM, said:

The error is
"Page Not Found" Errors on every page except homepage.

.htaccsss file code is:


Options +FollowSymlinks
RewriteEngine On
RewriteRule ^home$ index.php?id=1 [L]
RewriteRule ^contact-us$ index.php?id=2 [L]
RewriteRule ^logout$ index.php?id=3 [L]
RewriteRule ^login$ index.php?id=11 [L]
RewriteRule ^signup$ index.php?id=12 [L]
RewriteRule ^contact$ index.php?id=13 [L]
RewriteRule ^daybeam$ index.php?id=14 [L]
RewriteRule ^account-settings$ index.php?id=15 [L]
RewriteRule ^cashout-setting$ index.php?id=16 [L]
RewriteRule ^change-password$ index.php?id=17 [L]

You'll also want to add the ability to have closing slashes, like this:

RewriteRule ^home/?$ index.php?id=1 [L]

Front-end developer and writer
Twitter | GitHub | phpBB Contributor and Website Team Member | lynxphp
0


User is offline Daniel15 

  • dan.cx
  • Group: Moderators
  • Posts: 3415
  • Joined: 17-April 10
  • LocationMelbourne, Australia
  • Expertise:HTML,CSS,PHP,Java,Javascript,Node.js,SQL

Posted 06 June 2012 - 06:13 PM (#7)

Quote

You'll also want to add the ability to have closing slashes, like this:

Why? Having the same content at two different URLs is bad for SEO. No reason for the slashes, they're just extra characters that aren't needed :P
Daniel15! :D
Posted Image

Repeat after me: jQuery is not JavaScript. It is not the answer to every JavaScript-related question. When you have to write some JavaScript, do not instantly react with "Oh, I'll do that with jQuery!"

Spoiler
0


User is offline callumacrae 

  • {{ post.author }}
  • Group: Members
  • Posts: 2862
  • Joined: 20-January 11
  • LocationWarwickshire, England
  • Expertise:HTML,CSS,PHP,Javascript,Node.js,SQL

Posted 06 June 2012 - 06:19 PM (#8)

Because that's what people expect with directories.

A redirect, at least.
Front-end developer and writer
Twitter | GitHub | phpBB Contributor and Website Team Member | lynxphp
0


User is offline Rizwan 

  • Group: Members
  • Posts: 3
  • Joined: 06-June 12
  • Expertise:HTML,CSS,PHP,Javascript,SQL

Posted 06 June 2012 - 11:12 PM (#9)

Thanks
Daniel15,callumacrae,Ruku ,gibbonweb, _Sam

My site is working now but i don't know what was the error!!.

Thanks 4 reply.
0


User is offline gibbonweb 

  • 兄ヨハネス
  • Group: Members
  • Posts: 2062
  • Joined: 23-June 10
  • LocationMunich(DE)
  • Expertise:HTML,CSS,PHP,Javascript,Python,SQL,Graphics

Posted 07 June 2012 - 01:31 AM (#10)

Rizwan, on 06 June 2012 - 11:12 PM, said:

Thanks
Daniel15,callumacrae,Ruku ,gibbonweb, _Sam

My site is working now but i don't know what was the error!!.

Thanks 4 reply.

your site is in the subdirectory "/DayBeam/" and your redirects only matched URLs which were directly on the top level of your domain.
So your redirects never got any matches and you got 404s.
0


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Enter your sign in name and password


Sign in options
  Or sign in with these services