Jump to content

URL rewrite to .php


ce90
 Share

Recommended Posts

Hello everyone,

hopefully this is the right place to ask and is not a duplicate question.

I'm pretty new to processwire, so... if this question is kind of funny for some of you, you're welcome ? 
I have the following issue and can't find anything understandable about it. Maybe I'm searching the wrong way, but anyways.. here is my question:

How is it possible to rewrite the URLs, that I'll get a *.php ending?

Example:
https://www.mysite.de/urlsegment/ -> https://www.mysite.de/urlsegment.php
https://www.mysite.de/urlsegment/urlsegment/ -> https://www.mysite.de/urlsegment/urlsegment.php

Because I've read a lot about "Why do you wanna do this or have that?" – here my answer for that in advance:
I've built a processwire installation inside or around an existing website. Therefore, we want to keep the existing *.php Google entries. Sure, we could redirect via 301 Redirect, but would prefer to keep the *.php ending.

If you have further questions, please do not hesitate to ask.

Thank you in advance for your help.

Best regards
ce90

  • Like 1
Link to comment
Share on other sites

2 hours ago, ce90 said:

How is it possible to rewrite the URLs, that I'll get a *.php ending?

Have you tried this:

https://processwire.com/talk/topic/45-url-schema/?do=findComment&comment=150

"ProcessWire will support .html extensions. You just have to make them your page names, i.e. "about.html" rather than "about", or look for them in urlSegments. I've actually done this before, though for specific pages (like /sitemap.xml), not on a site-wide basis. But I don't see any problem with it  conceptually."

  • Like 5
Link to comment
Share on other sites

Hi @ce90 and welcome to the forum!

3 hours ago, ce90 said:

I've built a processwire installation inside or around an existing website. Therefore, we want to keep the existing *.php Google entries. Sure, we could redirect via 301 Redirect, but would prefer to keep the *.php ending.

I'd be happy to hear more about your setup to get a better context ? 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...