Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: .htaccess help needed - redirect to physical php page  (Read 3224 times)

iamneo007

  • Newbie
  • *
  • Karma: 0
  • Posts: 5
.htaccess help needed - redirect to physical php page
« on: October 25, 2009, 10:47:34 AM »

Hi All,

I am using sNews 1.6 MU version.
following is my htaccess page.

Code: [Select]

<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
RewriteEngine On


#RewriteCond http://www.mydomain.com/mycustompage/
#RewriteRule http://www.mydomain.com/mycustompage.php [L]

RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*) $1 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?category=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z_]+)/([^/]+) index.php?category=$1&title=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z_]+)/([^/]+)/([^/]+)/ index.php?category=$1&title=$2&commentspage=$3 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z0-9_-]+)/([0-9]+)/ index.php?category=$1&nbsp;articlespage=$2 [L]


Please help me to re-direct to the mycustompage.php

Logged

Pawel Landzberg

  • Newbie
  • *
  • Karma: 0
  • Posts: 16
    • Łuszczyca
Re: .htaccess help needed - redirect to physical php page
« Reply #1 on: October 26, 2009, 11:58:24 AM »

Try this:
Code: [Select]
Redirect /mycustompage http://www.mydomain.com/mycustompage.php [R=301,L]
Logged

iamneo007

  • Newbie
  • *
  • Karma: 0
  • Posts: 5
Re: .htaccess help needed - redirect to physical php page
« Reply #2 on: November 07, 2009, 03:57:04 AM »

No. It did not work.
Logged

Joost

  • Guest
Re: .htaccess help needed - redirect to physical php page
« Reply #3 on: November 07, 2009, 04:28:22 AM »

Try:

RewriteEngine on
#RewriteBase /sNews17
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule mycustompage/ mycustompage.php [L]
RewriteRule ^(.*)$ index.php?category=$1 [L]

Logged

iamneo007

  • Newbie
  • *
  • Karma: 0
  • Posts: 5
Re: .htaccess help needed - redirect to physical php page
« Reply #4 on: November 07, 2009, 07:13:56 AM »

Tried that also.. Shows only a blank page.

I have tried enabling debug info also. It still show blank.

This works in development machine. Not it production.

Dev Env: WampServer
Logged

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
Re: .htaccess help needed - redirect to physical php page
« Reply #5 on: November 07, 2009, 10:37:09 AM »

Moving this to appropiate section of the board.
Logged
"It's only dead fish that goes with the flow... "
Updated

Joost

  • Guest
Re: .htaccess help needed - redirect to physical php page
« Reply #6 on: November 07, 2009, 03:28:05 PM »

Tried that also.. Shows only a blank page.

I have tried enabling debug info also. It still show blank.

This works in development machine. Not it production.

Dev Env: WampServer

Test mycustompage.php
Logged

iamneo007

  • Newbie
  • *
  • Karma: 0
  • Posts: 5
Re: .htaccess help needed - redirect to physical php page
« Reply #7 on: November 11, 2009, 02:31:42 AM »

Unfortunately nothing works.

I have also tried creating a physical folder and moving the file there.
Still not working.

Only a blank page.  I do not know where I am missing.
Logged

Joost

  • Guest
Re: .htaccess help needed - redirect to physical php page
« Reply #8 on: November 11, 2009, 04:10:06 AM »

Apparently the php file is not working.
Logged

iamneo007

  • Newbie
  • *
  • Karma: 0
  • Posts: 5
Re: .htaccess help needed - redirect to physical php page
« Reply #9 on: November 12, 2009, 03:41:10 AM »

I created a phpinfo() file and checked. That is working.

It seems that some part in the custompage is not working. I will check.
Logged