J_P
J_P

Reputation: 183

Why does my clean url not work inside another folder?

I am trying to get clean URL's for SEO purpose. I have never done this before and I got It working for the simple file's inside my page folder.

However I have a other folder inside my page folder called folder b

My messy URL(inside page folder): index.php?page=

Messy URL from folder b: index.php?page=folderb/file

I got a clean URL from the page folder. But from my pages in folder b I don't get it to work.

I already tried adding a other .htaccess file to my folder b folder and override the root .htaccess

I tried to domainname/folderb/nameFile in my navbar.

All the things that I tried I got a 404 page

My .htaccess file

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/?$ index.php?page=$1 [L,QSA]

RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+index\.php\?page=([^\s]+) [NC]
RewriteRule ^ %1? [R=301,L]

I expect to get a clean url from my folder b that's inside my page folder.

Upvotes: 1

Views: 122

Answers (1)

J_P
J_P

Reputation: 183

Okay so I gave it another try and I went only worse I got this error message

Bad Request Your browser sent a request that this server could not understand. Reason: You're speaking plain HTTP to an SSL-enabled server port. Instead use the HTTPS scheme to access this URL, please.

And It seems I cant turn this back. It doesnt mather if I switch to my old .htaccess and change the URL in my header.php

My other page's are working but all the pages in domainName/home/Server/https/fastcgi/rid/54/26/59315426/htdocs/folderB/file

Upvotes: 0

Related Questions