vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   htaccess rewrite does't work (https://vborg.vbsupport.ru/showthread.php?t=300709)

Calahan 08-01-2013 01:00 PM

htaccess rewrite does't work
 
Hello
I am using an older plugin which rewrites a php file to a html

The htaccess which did this on my old server is

Code:

AcceptPathInfo On
<Files topic>
ForceType application/x-httpd-php
</Files>
<Files forum>
ForceType application/x-httpd-php
</Files>

Unfortunately it doesn't work on my new server.
If I click on the link the browser tries to download the php file

final kaoss 08-01-2013 01:14 PM

try this.

AddType application/x-httpd-php htm html php
AddHandler application/x-httpd-php .htm .html

Calahan 08-01-2013 01:28 PM

I added it to the htaccess
If I access the files now it directly starts a download of the files

Do I have to change something in my httpd.conf or php.ini?

final kaoss 08-01-2013 01:34 PM

If that doesn't work, this is said to be working. Let me know if it does the job for you or not.

Code:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^site.com [NC]
RewriteRule ^(.*)$ http://www.site.com/$1 [L,R=301]
 
RewriteCond %{REQUEST_URI} ^(.*)\.php$
RewriteRule ^(.*) /$1.html [R=301,L]


Calahan 08-01-2013 03:32 PM

Thank you for your help but I doesn't work
If I write this in the htaccess file and enter my URL it shows me the PHP-code of the file

final kaoss 08-01-2013 03:42 PM

Alright then I suggest you continue your search here, maybe you can find something that works. GL!

https://www.google.com/search?q=rewr...hrome&ie=UTF-8


All times are GMT. The time now is 06:35 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01235 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete