Jump to content


Photo

What's wrong?


  • Please log in to reply
7 replies to this topic

#1 Boxerman

Boxerman

    Advanced Member

  • Members
  • PipPipPip
  • 222 posts

Posted 25 January 2013 - 07:12 PM

Hi guys could someone just double check this for me please I need a fresh set of eyes.

RewriteEngine On
RewriteRule ^/admin /admin [L]
RewriteRule ^/?watch/([a-z0-9-/]+)$ index.php?menu=watchmovie&perma=$1 [L]
RewriteRule ^/?([a-z0-9-/]+)\.html$ index.php?menu=$1 [L]
RewriteRule ^/?pages/([a-z0-9-/]+) index.php?menu=page&permalink=$1 [L]
RewriteRule ^/?movies index.php?menu=movies [L]
RewriteRule ^/?tv-shows index.php?menu=tv-shows [L]
RewriteRule ^/?home index.php?menu=home [L]
RewriteRule ^/?([a-zA-Z0-9-]+)/season/([0-9]+)/episode/([0-9]+)$ index.php?menu=episode&perma=$1&season=$2&episode=$3 [L]
RewriteRule ^/?([a-zA-Z0-9-]+)/season/([0-9]+)$ index.php?menu=show&perma=$1&season=$2 [L]
RewriteRule ^/?([a-zA-Z0-9-]+)$ index.php?menu=show&perma=$1 [L]

Thanks!

#2 requinix

requinix

    Transforming Moderator

  • Moderators
  • 6,236 posts
  • LocationWA

Posted 25 January 2013 - 07:38 PM

What's wrong is you haven't told us the problem or what we should be looking for.

#3 Boxerman

Boxerman

    Advanced Member

  • Members
  • PipPipPip
  • 222 posts

Posted 25 January 2013 - 07:56 PM

Sorry I forgot.

Basically you have to put /?home in order for it to work. It does not work when doing /home

#4 Boxerman

Boxerman

    Advanced Member

  • Members
  • PipPipPip
  • 222 posts

Posted 25 January 2013 - 07:57 PM

Please note this is the new code:

RewriteEngine On
Options +FollowSymlinks
RewriteRule ^watch/([a-z0-9-/]+)$ index.php?menu=watchmovie&perma=$1 [L]
RewriteRule ^([a-z0-9-/]+)\.html$ index.php?menu=$1 [L]
RewriteRule ^pages/([a-z0-9-/]+) index.php?menu=page&permalink=$1 [L]
RewriteRule ^movies/ /index.php?menu=movies [L]
RewriteRule ^tv-shows index.php?menu=tv-shows [L]
RewriteRule ^home index.php?menu=home [L]
RewriteRule ^([a-zA-Z0-9-]+)/season/([0-9]+)/episode/([0-9]+)$ index.php?menu=episode&perma=$1&season=$2&episode=$3 [L]
RewriteRule ^([a-zA-Z0-9-]+)/season/([0-9]+)$ index.php?menu=show&perma=$1&season=$2 [L]
RewriteRule ^([a-zA-Z0-9-]+)$ index.php?menu=show&perma=$1 [L]

#5 requinix

requinix

    Transforming Moderator

  • Moderators
  • 6,236 posts
  • LocationWA

Posted 25 January 2013 - 08:24 PM

Depending on a few things mod_rewrite may think the URL starts with a slash or not. Using ^/? is a good way to make sure that the rule works in both cases.

#6 Boxerman

Boxerman

    Advanced Member

  • Members
  • PipPipPip
  • 222 posts

Posted 25 January 2013 - 08:28 PM

I have tested both ways

For example:

If I got to test.com/home this shows a blank page
But...
If I go to test.com/?home this shows correctly.

It's confusing me now.

#7 requinix

requinix

    Transforming Moderator

  • Moderators
  • 6,236 posts
  • LocationWA

Posted 25 January 2013 - 09:31 PM

The question mark in the URL means something completely different than the question mark in the RewriteRule. The page you're testing now is the same page as test.com/index.php?home.
Try going to test.com/?movies.

#8 Boxerman

Boxerman

    Advanced Member

  • Members
  • PipPipPip
  • 222 posts

Posted 27 January 2013 - 03:44 PM

As stated above the website works when goin to test.com/?movies but not when going to test.com/movies




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com