espfutbol98
New Member
- Messages
- 200
- Reaction score
- 2
- Points
- 0
I have had some url rewriting problems but I usually just worked around them. The overall problem is basically, a rewritten url that is similar to another is redirected. And example is terror.audio. I redirected all .audio files to a special folder that holds mp3s. For some reason, it likes to put the /error page in the place of just terror.audio. Here is my root .htaccess file:
How should I solve this? I have read, what I believe to be, all the documentation on the Apache website and have found nothing.
By the way, if you want to see how it fails, https://podaci.co.uk/terror.audio?403 shows the error?403 page when it should be (without the ?403 of coarse) an mp3.
Even the actual location (https://podaci.co.uk/design/audio/terror.mp3) with the ?403 gives the 403 error page. And without the ?403 the blank error page.
Code:
Redirect /bank /~mason/bank
order allow,deny
deny from 66.249.*.*
deny from 220.162.207.62
deny from 38.119.107.*
deny from 207.44.237.18
deny from 82.192.79.7
deny from 74.125.75.1
deny from 218.64.91.94
allow from all
Options -Indexes
ErrorDocument 400 /error?400
ErrorDocument 401 /error?401
ErrorDocument 403 /error?403
ErrorDocument 404 /error?404
ErrorDocument 500 /error?500
SetEnv TZ Europe/Berlin
AddDefaultCharset UTF-8
DefaultLanguage hr-HR
DirectoryIndex index.php naslovnica.php index.html
RewriteEngine on
RewriteBase /
RewriteRule ^index.php$ naslovnica.php
RewriteRule ^login$ login.php
RewriteRule ^logout$ logout.php
RewriteRule ^naslovnica$ naslovnica.php
RewriteRule ^glazba$ glazba.php
RewriteRule ^guest$ guest.php
RewriteRule ^o_nama o_nama.php
RewriteRule ^kontakt kontakt.php
RewriteRule ^druge_stranice druge_stranice.php
RewriteRule ^projekti projekti.php
RewriteRule ^glazba glazba.php
ReWriteRule ^masta_ace masta_ace.php
RewriteRule ^mos_def mos_def.php
RewriteRule ^common common.php
RewriteRule ^jezik jezik.php
RewriteRule ^preuzimanja preuzimanja.php
RewriteRule ^druga_preuzimanja druga_preuzimanja.php
RewriteRule ^brisanje_račun delete_account.php
RewriteRule ^register register.php
RewriteRule ^izmjena_računu update_account.php
RewriteRule ^samo_korisnike samo_korisnike.php
RewriteRule ^moj_račun user_personal.php
RewriteRule ^moj_racun user_personal.php
RewriteRule ^kutak_za_korisnike kutak_za_korisnike.php
RewriteRule ^signup signup.php
RewriteRule ^linkovi linkovi.php
RewriteRule ^mc_sniper mc_sniper.php
RewriteRule ^other_music$ other_music.php
RewriteRule ^hrvatski hrvatski.php
RewriteRule ^korejski korejski.php
RewriteRule ^([^/]+).pdf /design/documents/$1.pdf
RewriteRule ^([^/]+).zip /design/documents/$1.zip
RewriteRule ^([^/]+).audio$ https://podaci.co.uk/design/audio/$1.mp3
RewriteRule ^([^/]+).wma$ https://podaci.co.uk/design/audio/$1.wma
RewriteRule ^([^/]+).mp3$ https://podaci.co.uk/design/audio/$1.mp3
RewriteRule ^([^/]+).png /design/images/$1.png
RewriteRule ^([^/]+).glazba$ https://podaci.co.uk/design/audio/mc_sniper/$1.mp3
RewriteRule ^([^/]+).jpg /design/images/$1.jpg
RewriteRule ^ssl$ ssl.php
RewriteRule error error.php
RewriteRule ^hr$ lang.php?hr
RewriteRule ^en$ lang.php?en
RewriteRule ^~([^/]+)$ /users/$1/
RewriteRule ^~([^/]+)(.*)$ /users/$1$2
##################Login#################################
RewriteRule ^([^/\.]+)/logout$ logout.php?redirect=$1
RewriteRule ^([^/\.]+)/([^/\.]+)/logout$ logout.php?redirect=$1&name=$2
RewriteRule ^([^/\.]+)/login$ login.php?redirect=$1
RewriteRule ^([^/\.]+)/([^/\.]+)/login$ login.php?redirect=$1&name=$2
########################################################
By the way, if you want to see how it fails, https://podaci.co.uk/terror.audio?403 shows the error?403 page when it should be (without the ?403 of coarse) an mp3.
Even the actual location (https://podaci.co.uk/design/audio/terror.mp3) with the ?403 gives the 403 error page. And without the ?403 the blank error page.
Last edited: