Announcement

Collapse
No announcement yet.

How to remove .html off the request url?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • m-d-luffy
    replied
    Originally posted by Cruisey View Post

    5.4.3. Ive managed to resolve the issue inside the routing.php
    I use this code to convert old links to vbseo :
    RewriteRule ^t(.*)/$ https://sa-ar.anime-toons.tv/showthread.php?t=$1 [L,R=301]
    RewriteRule ^f(.*)/$ https://sa-ar.anime-toons.tv/forumdisplay.php?f=$1 [L,R=301]

    Leave a comment:


  • Cruisey
    replied
    Originally posted by m-d-luffy View Post

    What version are you currently using?
    5.4.3. Ive managed to resolve the issue inside the routing.php

    Leave a comment:


  • m-d-luffy
    replied
    Originally posted by Cruisey View Post

    Some just has the .html attached to it. We used to use vbseo
    What version are you currently using?

    Leave a comment:


  • Cruisey
    replied
    Originally posted by m-d-luffy View Post

    What is the format of your current or old links?

    How do you want to be new links?
    Some just has the .html attached to it. We used to use vbseo

    Leave a comment:


  • Cruisey
    replied
    Originally posted by Wayne Luke View Post
    If you don't want it to redirect, you shouldn't at a redirect rule to do that.

    You should be able to access existing pages in the same directory as index.php just using their name. So if you add a file named file.html to the directory, it will still load. In other words, you shouldn't have to make any changes to the .htaccess file to access *.html files in the same directory as vBulletin.

    If you really want to bypass the redirect, you need to edit this line:
    Code:
    RewriteCond %{REQUEST_URI} !\.(gif|jpg|jpeg|png|css)$
    So it looks like this:
    Code:
    RewriteCond %{REQUEST_URI} !\.(gif|jpg|jpeg|png|css|html)$
    Thanks!

    Leave a comment:


  • m-d-luffy
    replied
    Originally posted by Cruisey View Post
    Since upgraded from vb4 to vb4, most users has an old url with a .html at the end. I need to remove that before it called the routing.php. How to achieve this? I tried to add this in the .htaccess file:

    Code:
    # Main Redirect
    RewriteCond %{REQUEST_URI} !\.(gif|jpg|jpeg|png|css)$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME}.html -f # This is what I've added
    RewriteRule ^(.*)$ index.php?routestring=$1 [L,QSA]
    Restarting apache does nothing. The issue is, the page redirects when I added the .html. I need it not to redirect.
    What is the format of your current or old links?

    How do you want to be new links?

    Leave a comment:


  • Wayne Luke
    replied
    If you don't want it to redirect, you shouldn't at a redirect rule to do that.

    You should be able to access existing pages in the same directory as index.php just using their name. So if you add a file named file.html to the directory, it will still load. In other words, you shouldn't have to make any changes to the .htaccess file to access *.html files in the same directory as vBulletin.

    If you really want to bypass the redirect, you need to edit this line:
    Code:
     
    RewriteCond %{REQUEST_URI} !\.(gif|jpg|jpeg|png|css)$
    So it looks like this:
    Code:
    RewriteCond %{REQUEST_URI} !\.(gif|jpg|jpeg|png|css|html)$

    Leave a comment:


  • Cruisey
    started a topic [Resolved] How to remove .html off the request url?

    How to remove .html off the request url?

    Since upgraded from vb4 to vb5, most users has an old url with a .html at the end. I need to remove that before it called the routing.php. How to achieve this? I tried to add this in the .htaccess file:

    Code:
        # Main Redirect
        RewriteCond %{REQUEST_URI} !\.(gif|jpg|jpeg|png|css)$
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME}.html -f # This is what I've added
        RewriteRule ^(.*)$ index.php?routestring=$1 [L,QSA]
    Restarting apache does nothing. The issue is, the page redirects when I added the .html. I need it not to redirect.
    Last edited by Cruisey; Wed 12 Sep '18, 12:10am.
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X